This prevents the spam being sent, as described in this Aspiring Socialites post by Lemoness:
"Hey guys! Just as a quick heads-up of something that you might see questions about -- we seem to have some instances of people signing up with spam in their usernames so that they can abuse Habitica's automatic email system. No emails are going out right now until we've completely halted the problem. What that means:
- You may see reports of emails not being received (e.g. when a quest starts). This is temporary, and we're working on getting it resolved ASAP, though it necessitates approval from our email client, which may take some time since it's currently a Friday night.
- A change is going to go live very soon that will prevent this issue from happening again, restricting all new usernames to 20 alphanumeric characters (aka only a-z and 0-9, with no spaces or special characters). This won't affect existing accounts unless you change your login name, but display names are still remaining the same!
If you have any questions, don't hesitate to let us know."