Cats wait outside the bathroom mainly because they seek attention and affection, feel curious and want to monitor their owner, or experience a sense of comfort and security by being close to them. This behavior is also influenced by their territorial instincts, desire to stay connected, and curiosity about what their owner is doing behind a closed door. Additionally, some cats may wait as a way to protect or keep an eye on their owner during a vulnerable moment like going to the bathroom. Overall, waiting outside the bathroom is a common sign of a cat's attachment and natural behavior to stay close to their human companion.