It’s worth pointing out that names and usernames aren’t the same thing. Usernames are used in URL paths, for example:
https://meta.discourse.org/u/pfaffman/summary
An exclamation mark isn’t a valid character in a URL, while characters such as ? & have special purposes in URL structure and therefore also can’t be part of a username. This isn’t specific to Discourse, any system which uses the username in the URL structure has to respect this.
A username can’t contain an exclamation mark, but the name can, which you can prioritize in the UI.