Staying logged into accounts while on public Wi-Fi leaves active sessions that could be hijacked. Logging out of sensitive accounts when you finish reduces what an attacker on the network could reach.
“An open session on public Wi-Fi is a gift to whoever's watching.”