There are usually several reasons. First, it could be because the owner or the cat likes to be in the toilet, and the cat may like to follow the owner. Second, it could be because of the running water in the toilet bowl, as cats usually like to drink water from the toilet.

In addition, cats are attracted to scents they like. Bathrooms usually have a consistent odor, such as from cleaning products, detergents, and soaps. These scents may be what attract cats; they enjoy sniffing different smells, so choosing to stay in this location makes them feel happy.