I've seen a lot of adorable photos of people's pets trying to get into the bathroom (and sometimes succeeding). For my personal experience, when I was living alone, sometimes I would leave the bathroom door open (no fan because it was a poorly built apartment -- something else I'll need to remember to ask about next time I'm looking for a place). My cat would immediately follow me in and proceed to twine around my legs purring and headbutting me. I don't understand why he feels the sudden need to bond with me when I'm there. I'm in a similar sitting position on the sofa or in a chair other times, and he's not like that.
Here's a comic that sort of sums it up:
Does your pet exhibit a similar special desire to be with you if you're going to the bathroom?