Not all mathematicians forbid taking a derivative at the endpoint of an interval.
Consider the question Derivative at Endpoint,
which provides a passage from Rudin's Principles of Mathematical Analysis
according to which a function defined only on a closed interval may have derivatives at the endpoints of that interval.
You can also examine the answers to
derivative on endpoints.
The choice to allow or disallow derivatives at endpoints depends on technical details of how you define a derivative in the first place.
For example, if you use a definition that computes left and right derivatives separately and then requires them to be equal in order have and ordinary derivative,
differentiation is clearly impossible unless the function is defined on both sides of the point where you wish to differentiate it.
But it is not necessary to define differentiation that way.
With regard to the examples you cited in the question:
The fact that someone may say in some piece of mathematics that if
$f$ is differentiable on $(a,b)$ then a certain fact is true,
it does not mean that $f$ cannot be differentiable at $a$ or $b.$
It merely means that we do not need $f$ to be differentiable at $a$ or $b$
in order to reach the desired conclusion.
Putting unnecessary conditions in a theorem is generally a bad idea, since in those cases where the condition isn't met you are unable to use the theorem,
whereas if you had omitted the unnecessary condition you might find all the other conditions are satisfied and the theorem applies.
Conversely, when we say that
if some other fact is true then $f$ is differentiable on $(a,b),$
we may mean only that sometimes $f$ can fail to have a derivative at
$a$ or $b$ even though the given fact is true.
It might even just mean that it was too much bother (and not worthwhile enough)
to prove that $f$ is differentiable at the endpoints.
It is certainly not warranted to conclude from such a statement that
$f$ cannot be differentiable at $a$ or $b.$