This is a very cultural thing and also gender-based
I am a male Canadian, born and raised. My father's side of the family (the side my bathroom norms would come from) has been here since before we became a country. Greeting someone exiting the washroom is strange to me. My co-workers who are American or even European have never done it either. I don't really know why it is not done, but it is not done. Jamaicans also do not seem to converse in or near bathrooms.
But then co-workers from other continents will start conversations while both of us are at the urinal. We can both be peeing and they will casually ask how my part of the project is going.
Women will go to the washroom in groups, so these norms just appear to apply to men.
Say I'm walking to my desk and a coworker happens to leave the washroom right in front of me, should I say "hello/good morning" or is that awkward?
This really depends on where you are located and what your co-workers are like. I adapt my behavior to what others initiate. Someone wants to say hi in and out of the washroom, I am fine with that. If they want to completely avoid others, that is fine as well.