Mostly true for factory farms, though it doesn't have to be that way. My buddy has 20 hens and the coop he built them is like the Taj Mahal. They have a nice big run to play in and in the summer they get lots of fresh plants and veggies.
Insulated, heated, lighting... they seem to be quite happy and the eggs are delicious.