I don't believe there is any restriction, per se. More likely, it's for convenience. If you have a space in a file name such as "My File.pdf", it ends up looking like this if it is viewed in the browser: My%20File.pdf. And that can become confusing as well as sometimes break the link. So just to be on the safe side, we always suggest substituting an underscore for a space.
Thank you Rick!