At some time in my life (probably during the 80s), I encountered information about India and Hinduism leading to a particular explanation for the sacredness of cows. Checking the Wikipedia, I see nothing that mentions like it, though it doesn’t necessarily negate it either.
So what I heard, as I recall it, was that the caste system was tied in with reincarnation and karma. If you lived a good life, you were to be reborn in a higher caste, a wicked life and you would be reborn in a lower caste. Besides the human castes, the whole system of “higher” and “lower” included the animal kingdom. If you sunk lower than the lowest human caste, you might end up being reborn as a tick or whatever, for instance.
Supposedly, a cow was higher than the highest human caste. Someone who had achieved this state had been very holy and was now here to live selflessly in giving milk and dung to the people. Killing them unnecessarily is like killing the holyest holy man.
Wholecloth or what?