The main reason for this is that the notion of differentiation breaks down in sets that are not open. Recall that the derivative of a function $f$ is given by $$f'(x) = \lim_{y\to x}\frac{f(y)-f(x)}{y-x}.$$ This definition makes no distinction about which direction $y$ approaches $x$ from, and for the limit to exists, it needs to exist for $y\to x^+$ and $y\to x^-$. Obviously on the boundaries of a closed interval, only one of these limits can be computed, so the derivative may not be well defined.
The other reason for this in differential equations is that (loosely speaking) when we integrate a derivative, we get information about the boundary. E.g. $\int_a^b f'(x)dx = f(b)-f(a)$. Also, the endpoints constitute a set of measure zero, which essentially means that $\int_{(0,1)}f(x)dx = \int_{[0,1]}f(x)dx$.
When analyzing differential equations, it is necessary to characterize the behavior at the boundary separately from the differential equation, since if we integrate the differential equation, the actual value of the differential equation at the end points get lost and we are left only with information about the solution at the boundary.