Chickens have been domesticated for a very long time. Modern factory farming, however, only began in the second half of the twentieth century. In the Middle Ages, and indeed in the West until maybe 60 years ago, eating chicken was a luxury. But everybody ate eggs.
It is now a big deal to have "free range" chickens. But chickens until very recently were always free range. They would have wandered around a medieval farmyard, eating spilled grain and gobbling up insects. One of the reasons they were kept was for their role in helping control insects.
Since chickens found their own food, very little effort was required, other than to provide a henhouse where the chickens would be safe at night from marauding foxes and other predators. Even though few people now keep chickens (and even fewer worry about foxes), we still have proverbs and saying about foxes in henhouses.
The other reason that every farm had chickens was for the eggs. One used to be able to buy "pullet" eggs, and that's what medieval eggs were like, small, requiring several to equal one of today's "large" eggs (much less "jumbo"). The free-range hens tended to hide their nests, so the challenge was to find them before rather than after there was a half-formed baby chick inside (unlike now, eggs were fertilized).
Everyone ate eggs, even monks. Indeed, in the twelfth century one group of monks mocked another, saying they prided themselves on eating eggs rather than any meat, but then had eggs fried, boiled, scrambled, poached, baked, and so on.
Monks followed a vegetarian but not vegan diet; the Benedictine Rule forbade eating four-footed animals unless one was very sick. This meant that the monks could theoretically eat chicken as well as fish, although, like other medieval people, they would only eat a hen when she had stopped laying and hence was rather old. Young cockerels might be eaten, however, once they were determined not to be hens and hence expendable; a farm needed only one or two roosters.
With factory farms, we assume chicken is cheap. Before World War II, however, chicken was expensive enough that a politician could promise "a chicken in every pot on Sunday" and know that he was promising luxury and high living. Pork might even be substituted for the more-expensive chicken (one still sometimes sees the term "city chicken," meaning pork).
Click here for more on the medieval diet.