An alternative version of the question is, “Why does my cat bite me when I get out of the shower?” The same reason is behind both aspects of feline behaviour. For me, it is all to do with scent. The scent or body odour of the person asking the questions. When a cat guardian is getting out of a shower the air is filled with her scent. This may have been boosted by peeing in the shower. More scent.
For their domestic cat companion the effect is like seeing their large significant other in super sharp high definition. It is like a 4k television. A cat’s eyesight it pretty good but not as good as human eyesight (click this to see what cat’s see). But their sense of smell is much better than ours. When a cat combines their senses of smell and sight they receive a sharper “image”. They get excited when you get out of the shower because it is YOU in bold type. It is an enhanced you and they want to be with you.
They have probably followed you to the shower because they want to be close to you anyway. You are temporarily out of contact. Suddenly you are there in HD. They may become excited. The bite is an uncontrolled expression of excitement; a sort of play-bite.
Really, the driving force of this form of feline behavior is their reliance on scent. They depend upon it a lot. You see it all the time. Cats frequently sniff their human companions. They don’t have to but they like to. It is a reassurance. Smelling them is like looking at him or her. It sharpens the image. Another analogy is looking at a film in the English language but the actors are mumbling which is a modern realism trend. If you have the subtitles on even if you are a native English speaker it sharpens up the film. You can understand the plot better. Cats use their noses in the same way to read what is before them. It might be a person, another cat or food. It doesn’t matter.
Bathrooms and toilets are what Jackson Galaxy calls “scent soakers”. They are loaded with the smell of the person who uses them. Bedroom are the same. Cats love it. It is the same reason why cats can go nuts when you sit down to have a poop or a pee. More delicious smells. Cats are not squeemish like humans about these fundamental aspects of human anatomy and biology.
Some more on scent – there is lots more