In America, most beef animals are born on and raised on grass. This is both cheap and effective. When the beef animals are older they are moved to a feedlot where they walk around and eat corn and silage until they are fat. It is a poor farmer that mistreats their livestock, if only because the livestock grow more slowly and in general do not do as well. Most of the farmers who stay in business are pretty good at what they do, and take pretty good care of their animals. Though, there are a few poor farmers that have not gone out of business yet, and so there are still some pretty shocking pictures out there of neglected or mistreated livestock. It is illegal to mistreat animals, but that does not stop some people!
That being said, the traditional chicken cages for layers really are too small. I firmly believe that a critter of any type should be able to stretch in its cage and walk a step or two, and not all laying hens can.
My children's miniature rabbit lived in a cage and he could ONLY walk a step or two in his cage, but he seemed happy enough: possibly because the kids had him out of his cage a couple of times a week so he got a chance for some proper exercise. They liked to sit on the couch and watch TV, and the rabbit would go back and forth along the sofa and across their laps. When he stopped the kids would pet him and then he would be off again!
In the wild, rabbits stay in burrows excepting for at dawn and at dusk, at which time they come out to eat and drink. I do not think it hurts a rabbit any to stay in a cage, as long as they can exercise some.