Too far back to remember, the deification of cows in India seems to have existed. Are there some possible events in history which would explain this?
TL;DR While the cow has always been treated with veneration in Hindu mythology and literature, the roots of the sacred status that it now enjoys are primarily because it was a convenient symbol of mobilization, first to counter the rising tide of Buddhism and then in the nationalist pre-independence movement. Rational arguments based on the economic value of the cow to a rising India were primarily an afterthought justifying more primitive religious and cultural arguments-- though the cow was a great source of wealth and value for millennia.
The long version:
A few snippets from the past:
Mythology and Literature
The Rigveda calls cows aghnya- "that which may not be slaughtered". Several stanzas indicate that cows were treated with reverence and should be protected. This is possibly because cows were heavily relied upon- for their products (dairy, dung)- and treated as the caretaker of the home- gau mata. A vast array of words were dedicated to refer to them in different stages.
Many stories revolve around Krishna, a.k.a. Gopala "the cow protector". Cow milk is stated as Sattvic (i.e. cleansing).
Vedic period: 1500 - 500 BCE (sourced from Brown)
Cattle were a measure of wealth, and a key part of war booty. The usefulness of the cow/ox in terms of milk, flesh and agricultural assistance are stressed in the Rig Veda. Cattle had ritualistic significance too; they were the main sacrificial animals, and their products were used as offerings. Scholars debate whether the cow is beginning to attain inviolability, for all but the Brahmans. The end of the Vedic period coincides with the rising popularity of the Ahimsa (do no harm) philosophy, as well as an increased literalism in the sanctity of cows, by some records.
500 BCE - 500 AD
Manu's laws forbid the eating of consecrated flesh (that which is not sacrificed); though he stresses the value of the cow and lists her many virtues, this still seems like a part of the broader Ahimsa philosophy. He who eats the meat of any animal in this world will be eaten by that same animal in yonder world.
According to legend, a Chola king who was a follower on the Manusmriti executed his son to provide justice to a cow.
The Mahabharata (~400 BCE) states that he who kills a cow lives as many years in hell as there are hairs on the cow's body, basically urging you to shave the cow before killing it. Both Ahimsa and cow worship are treated as established doctrine and extolled as desirable.
The Arthashastra (~200 BCE) recognizes meat-selling as legal, but states that cattle were not to be slaughtered, possibly unless they were economically worthless.
By the 4th century AD (Gupta dynasty), the sanctity of the cow is established in Brahmanical circles.
Much of what happens between 500-1500 AD is similar-- the cow is venerated in Hindu kingdoms, but is often sacrificed or killed to honour guests. Beef-eating is largely treated as a sin.
1500 - 1857 (Mughal Empire)
During the Muslim invasion, Hindus are recorded as often being shocked by cow-slaughter.
In the 1600s, Maratha (Hindu) chieftain Shivaji treated cow protection as a key part of his rule.
Rumors of cartridges being greased with cow fat lead to a Sepoy mutiny.
Swami Dayananda Saraswati establishes Arya Samaj and publishes Gokarunanidhi where cow slaughter is opposed as anti-Hindu act. They are helped by the rise in easy transport (trains, buses) and printing presses to spread the message. The first Gaurakshini sabha (cow protection society) is set up in Punjab.
The Allahabad High Court rules that cows are not sacred as per section 295 of the IPC and hence their slaughter was not illegal.
An estimated 31-45 riots over six months broke out between Hindus and Muslims, mainly in present-day UP, but also in other parts of the country. 107 people were killed.
1930s-1948 Gandhi - "The central fact of Hinduism is cow protection"
1950 The Directive Principles of the Constitution of India suggest that cow slaughter should be abolished.
1966 "Hindu" organizations led by a fasting Shankaracharya demand a ban on cow slaughter as per the (unenforced Directive Principle). A mob of allegedly over 10000 people tried to storm the parliament, eventually rampaging through New Delhi, leading to a 48-hour curfew.
All of this and more is described in great detail in:
Brown, W. Norman. "The sanctity of the cow in Hinduism." The Madras University Journal 28.29 (1957).-- cows were offered in sacrifices, and were not inviolable in Vedic times. This is an excellend, short reference that answers the bulk of this question (valid until 1964).
Jha, Dwijendra Narayan. The myth of the holy cow. Verso, 2002. deals with the early history, but glosses over medieval India.
Ambedkar, Bhimrao R. "Untouchability, the Dead Cow and the Brahmin." Collected Works of BR Ambedkar 7 (1979): 185-207. -- For the Brahmin everyday was a beef-steak day. The Brahmins were therefore the greatest beef-eaters
Describes how the roots of Brahmins vegetarianism lies in the conflict between Buddhism and Brahmanism. Eventually, the "holy cow" became a cultural symbol for mobilizing Hindu nationalists.
You may also wish to read this post describing how the cow gained political significance in modern India. This paper describes a debate on whether the cow is sacred for "irrational" or "calorific" reasons.
This is a simple narrative to explain many of the mysteries of religions. According to our X , Y chromosome genetics, see for example; https://phys.org/news/2011-11-genographic-humans-migrated-africa-arabia.html, all humans and even homo-eructus before, all migrated out of the horn of Africa to Asia via the Red sea, Yemen, Arabia and the rest of the world(see the maps produced by the National-Geographic above). And according to the genetic studies of archaeological sites, ancient humans reached, with the exception of few places, to all parts of the world driven up and down, east and west, by the antagonistic conditions of climate change,predators, prey, other food and diseases. This is example of the many good researches surfacing recently; https://www.youtube.com/watch?v=pOj170kogg0&t=3241s.
The early human society was based on the grandmother and siblings groups. Loosing her is strong among what started religion. First by believing that when people die they join grandmother. Then believing that she might come back to life and started taking a good care of the dead with good dresses, possessions and even food left in the grave. Left over from this system is still seen in isolated societies and some in our modern ones too- as in the rule of queens, the feminine names of things, towns and even some tribes. This started the worship of the ancestors and how it is spread all over the ancient world. Worshipping the cow/bull/calf/goat etc came next. Because the cow is gift to humans at difficult times- eating the poorly nutritious grass and giving back plenty of protein rich products. It fed the babies with milk and replaced the mother when she died too. So the next extension to religion was the worship of a range of animals. This also served to stop people killing for food these life saving animals. There are nomad tribes in Africa travelling all the way from its east coast to the west coast on the Atlantic, living mainly on cows. They use their urine for medicine and for washing their hair. This is in addition to using the dung to build their houses. The bulls high regards were clear in Mesopotamia, Europe and Asia.
The harsh environment conditions enlarged the religion further to worship the forces of nature like the wind, water and then the planets starting with the sun and the moon. That is why the sun is depicted in many religions around the ancient worked and the modern world too. Many flags still carry the sun, the moon and the stars. The lunar and solar time systems, the horoscope cults, and even the names of the days are a reminiscence of those times- like Sun-Day, and Moon-Day. The names for these days sounds differently in other languages, but also refer to the sun and the moon. With the growth in the population group numbers, strong rulers appeared and needed to reduce the Gods to one to avoid multiplicity of authority and this is how the unification religion appeared and spread all over the world- since the days of Abraham for example.
Now, because habits die hard, and religion is just one, people between time and time revert back to the more ancient version of the religion- mainly when the existing versions at the time get corrupted and abused- mainly by rulers. It remains to say that religion was the precursor to philosophy and science. Like them, religion also was trying hard to understand the world around so as to do what is needed to protect people and survive. Science at the moment is continuing this important path and as such, we should consider science to be the final version of all human religions.
In ancient Afro Asiatic culture, the bull was a symbol of an aged corrupt king (manifested by winter imprisoning the sun queen) that was ritually slaughtered every spring. Cattle worship was later present throughout the Mediterranean including Mesopotamia (remember the golden calf incident in the Bible, the Egyptian bull ritual in 25 yr cycles). The Harappans, the precursors of the Hindus, emigrated to India from Mesopotamia after exploring the sea from the Tigris and Euphrates and would have taken Mesopotamian culture with them, as well as sharing culture through trade. When the Aryans invoked the Brahmans to create the upanishads, some historians claim their attachment to bull worshiping was strong enough to make it an important tenant, which has never weakened. (Much of the other Hindu mythologies were Indo European from the Aryans). Interesting that the Minoans practiced a form of bull fighting (leaping) - and in Spain and Latin America - like conquering an enemy. Modern Spanish art symbolizes the bull as the anti-Christ (see pictures of the bull bowing to the glowing infant). So bulls/cows are good gods, corrupt gods, devils, symbols of brutal original sin, and slaughtered by the billions for food.