My guess as to why is because in most databases, a field, like a name of a stream, can only be a certain number of characters. They probably chose 40 because they assumed most stream names wouldn't be longer than that.
our limits tend to be very deliberate and not bound by random database incompetence
if you are creating an entire stream for something, you better be able to create at least 40 characters worth of content about why your stream exists and why anyone should post in it!