The discrepancy you see is accounted for by the following fact: if $f$ is unbounded on $(0,1)$ then it has to be either undefined or discontinuous at $0$ or $1$, and hence is not defined (or not continuous) on $[0,1]$.
Consider $f(x)=\dfrac{1}{x}$. This function is unbounded on $(0,1)$, but it is not defined on $[0,1]$ because it takes no value at $x=0$.
The proof of this fact is a fairly simple consequence of the result that any continuous function $f : [a,b] \to \mathbb{R}$ is bounded. If $f$ is bounded on $[a,b]$ then it is too on $(a,b)$. So if a continuous function is unbounded on $(a,b)$ then it must not be defined (or, at least, not continuous) on $[a,b]$, or else it would contradict this result.
Intuitively, a continuous function is allowed to misbehave at the endpoints of an open interval (because it doesn't have to be defined at the endpoints), but it must behave itself on a closed interval because closed intervals contain their endpoints.
It is not that "closed intervals are used for continuity and open intervals for differentiability" (more on this one later). It is that, for Rolle's Theorem (and the Mean Value Theorem), we need those hypotheses.
In the proof, we use that a continuous function on $[a,b]$ attains a maximum. And we only need differentiability inside, so we do not need to make further assumptions on the boundary about differentiability (again, more on this later). And it is a nice exercise to see that if you relax any hypothesis on Rolle's Theorem you do not have a true general statement anymore.
Now, continuity can be talked about in far more general settings. More particularly, we can talk about continuity on any subset of the real numbers in a rather canonical fashion (no need to be intervals, closed or open or whatever).
Differentiability is a little trickier. It is common to define differentiability only on open sets when we are in Euclidean space (not only open intervals, but open sets in general). This is partly due to the fact that being able to differentiate from every direction is a must in some theorems and some basic facts which we would like to have. However, there are cases for which talking about differentiability, in some sense, on "not-open" sets is useful and/or a must. This is true for example when talking about functions on the closed half-space (which enhances its discussion on manifolds with boundaries), or when talking about closed submanifolds of some manifold.
In your particular setting, we can define differentiability on $[a,b]$ on many ways. Firstly, we can simply extend to the fact that the limit which defines the derivative exists on the boundaries (however, it will be only a one-sided limit). Or we can extend by saying that $f$ is differentiable on $[a,b]$ if there exists a differentiable function $g$ on an open set containing $[a,b]$ such that $g|_{[a,b]}=f$. Instead of discussing this further, I'll just say that differentiability is more subtle than continuity with respect to its domains.
Best Answer
Continuity just needs to proved at each point $x_0$. Apply the theorem to the closed interval $[- \pi/2 + \epsilon, \pi/2 - \epsilon]$, and pick $\epsilon$ small enough that $x_0$ falls in the interval.