I have a six month old ginger kitten who gets very anxious if the bathroom door is closed on him. He'll take any opportunity to follow me in, whether I'm washing, brushing my teeth, or, um, using the loo (when I'd prefer to keep him out!) My first thought was that he wanted a drink, but he has easy access to water in the kitchen, and he never drinks while in the bathroom with me. He'll follow me right out again afterwards, and if I do manage to keep him on the outside, he meows pitifully at the door until it's opened.
He doesn't much like other doors being closed, but it's when people go into the bathroom that he gets worried or annoyed (or so it seems to me!)
When I mention my kitten's habit to people, many report that their cats have a tendency to follow then into the bathroom too, even if they are not inclined to follow humans around otherwise.
Apparently it's normal cat behaviour, but I'd quite like to find out why!