If you are talking about big cats, then it is because instinct urges them to move. They pace to expend energy. Cats do not stay in the same place all the time, they want to roam and hunt.
Other animals have similar patterns of behaviour; bears and elephants often do it out of boredom.
I really do feel sorry for these animals, but with human encroachment on their environment, soon wild animals will only be found in places like zoos and game reserves.