Hay was originally a way of making use of the excess spring growth which animals couldn’t eat. It then became a ready source of high quality nutrition for animals in the winter months.
But don’t confuse it with straw. They’re different. Hay is grown specifically to put up and store. It comes form various plants, but often alfalfa, harvested whole. Straw on the other hand is “the dry stalks of cereal plants, after grain and chaff have been removed.” 1