That makes sense, but here's how my mind processed this.
Fill out the fields I need. Name, password, use email as username. I legitmiately forgot to fill in the email filled but meant to.
Submit. Error "please enter a username". That's weird, there's no field named username, unless it is trying to submit a field that it'd want if I wanted to set a username. Re-toggle off/on use email as username option and try again. Same error, please enter a username. That's really weird, there's no username field. Oh, well I did miss the email field here, lets fill that in and try again. Success.
It's not a bug so much as it is just an incorrect and misleading error. There's no field named "username" yet the error tells you it's missing. Changing this one word to "email" would add a ton of clarification. I hope my thought process above helps you to understand how I thought it through. Guess had I not missed the email then this wouldn't be an issue, but then again, the error is there to help you find what you missed so it should be correct.
I've attached a screenshot of how I had the form filled out.