Does it have something to do with availability? It’s just interesting to me so many recipes call for it, yet we have many different options now for cooking.
Butter isn't at all ubiquitous. The three main classes of fats/oils used in cooking are butter/ghee, animal fats like lard, beef tallow, etc., and vegetable oils. Different regions and cuisines will often predominantly use one of these. For example, Mediterranean cuisines will often use olive oil, northern European will use butter, Indian will use ghee (clarified butter), southern US will use lard, West African palm oil, Chinese lard or rapeseed or peanut oil.
The perceived dominance of butter comes from a focus on northern European cooking, which is partly Anglophone, and partly from the northern French dominance of haute cuisine, including the modern version nouvelle cuisine. The regions where butter/ghee is common are the regions where dairying is common, where cattle or sheep or goats are kept for milk. Where fewer such animals were kept (e.g., some cattle or buffalo for traction), the cuisines tended to rely on lard (if pigs were kept) or vegetable oils. Since beef and sheep tallow also depend on the keeping of cattle and sheep, their use in cooking often overlaps with butter/ghee, with the preferred fat varying regionally. Sometimes, fats such as sheep tail fat were the most preferred fat, and sometimes butter. The preference for butter over tallow in France led to the development of margarine in order to make a more butter-like fat from beef tallow (the use vegetable oils in margarine came later; the original version use beef tallow).
The use of butter in northern European cuisine is ancient, as seen from finds of butter buried in bogs ("bog butter", although some of the finds are lard/tallow rather than butter).
Further reading
More on bog butter: https://www.newscientist.com/article/mg18124392-400-bog-butter-test/
As a professional cook I can't comment on the historical aspect much, other than speculation, but in modern cooking it's not really ubiquitous. There are 3 main fat types that I was taught; differing by what their consistency is a room temperature and how low their melting point is. In a historical perspective it's more clear as they are different ways of getting fat: churned from milk, rendered from animal fat, and squeezed from plants. The only difference I've noticed from old and new cookbooks is that the rendered animal fats like lard have fallen out of favour, to the rising stars of butter and oils. This is most likely due to the possible health effects, and rise in vegetarianism and veganism.
I want to quickly clarify that I work in central Canada and some of these trends/experiences will not be the same in other places.