Firstly I have made a tracker item here: https://tracker.moodle.org/browse/MDL-51677
I have been trying to look into this myself. I have been looking through Moodle Core code and am unable to find it. Where exactly is the code where it checks the username length when signing up a new account.