In cats, this is perfectly normal. Cats have a natural need to be close to their owners while they're in the bathroom, and it's something they do all the time. They may ask for your permission before you use the bathroom for safety reasons.