Why are Hindus so offended by beef eating and slaughtering of cows when cows were sacrificed to Indra in the historical Vedic religion and when the great sage Maharshi Yajnavalkya himself was very much fond of eating beef?
21. He (the Adhvaryu) then makes him enter the hall. Let him not eat (the flesh) of either the cow or the ox; for the cow and the ox doubtless support everything here on earth. The gods spake, 'Verily, the cow and the ox support everything here: come, let us bestow on the cow and the ox whatever vigour belongs to other species 1!' Accordingly they bestowed on the cow and the ox whatever vigour belonged to other species (of animals); and therefore the cow and the ox eat most. Hence, were one to eat (the flesh) of an ox or a cow, there would be, as it were, an eating of everything, or, as it were, a going on to the end (or, to destruction). Such a one indeed would be likely to be born (again) as a strange being, (as one of whom there is) evil report, such as 'he has expelled an embryo from a woman,' 'he has committed a sin 2;' let him therefore not eat (the flesh) of the cow and the ox. Nevertheless Yâgñavalkya said, 'I, for one, eat it, provided that it is tender.'
- Satapatha Brahmana 3:1:2:21