Dogs are notoriously “public” animals, perfectly willing to urinate and defecate in a busy area with lots of people observing. Cats are more reserved, and while they don’t object to being watched, they do object to having their litter box placed in a high-traffic area.
One way they show their displeasure with this situation is that they cease to use the box and find their own spot somewhere else in the home. A litter box, to satisfy both the cat and the owner, ought to be in a quiet, low-traffic zone in the home.