Why does mysql allow me to enter password for non existing mysql user
I'm sure someone else will be able to provide a more informed answer than this, but a common-sense guess would be that this is a security feature.

If someone is attempting a brute-force attack, they will need the username and password using the system described above. If MySQL reported invalid users before prompting for a password, half of the work is already done for the attacker.

This is purely theoretical, as I haven't tested anything or been informed on the subject by anyone else - just an educated guess based on other systems.