Historically, farmers grew the feed needed for their herds or flocks. They also typically raised their own replacement livestock, marketed their own eggs and dairy products, and culled their own animals. Manure generated by livestock was used for fertilizer on the farm.
The intensive farming of animals for food began in the late nineteenth century when egg-laying hens were confined in battery cages with sloped floors, permitting eggs to roll to the front of the cage where they could be collected by farmers. This system permitted farmers to determine how many eggs were produced by each hen and made it possible to selectively mate good layers, thus increasing the number of eggs that could be produced by hens over time. During the early twentieth century, battery cages were constructed with wire floors, permitting manure to fall through and be easily removed through the use of conveyor belts.