Securely hashing the username in the database protects the confidentiality of that information in the event that your database falls into the hands of an attacker.
Be aware though that if you use the un-hashed username in other ways in your application that information may still be obtained by an attacker.
For example, you mention:
When the user logs in, the unhashed username is stored in a session.
If we assume that your session information is sent to the client as part of the normal http response for a logged in user (e.g. as a cookie), the username may be obtained by an attacker if they get access to that session token. OWASP advises against storing user specific information in sessions sent to a client.
Using this unhashed username, specific user data can be obtained from
the database and the username can even be displayed on pages for
logged in users.
In this case the fact that you can use an un-hashed username to lookup database information implies that there is some un-hashed user information in the database, which undermines the hashing of the username in the first place. Also, if the information can be displayed in pages, be aware that unless the connection between client and server is secured at the transport layer (TLS) then that username may be visible to an attacker.