OP interested in what was done long ago. Then chickens kept when they had resources to do so.Additionally, free-ranging birds leads to losses. You can't pen your chickens in somewhere predator-proof and still have them get their own food.
But yeah, insect populations are falling all over the world, and a lot of people live in non-rural areas now. Anyone who lives in a neighborhood instead of a general chunk of farmland isn't exactly going to be able to have their chickens catch all their own food.