Bugs like T45518 where raw User objects are accidentally exposed would be much less frightening if things like the password hashes weren't included in the live object.
Ideally we should only look up a hash when comparing against it, and shouldn't keep it in memory the rest of the time.