The reason behind the cows becoming holy is probably because they were so useful. If they would not have been declared holy, the people would have killed them and afterwards they would have lost their milk, cheese and the burning material
However, the whole thing became much more radical because of the British. After the big rebellion of 1857 they increased the tensions between Muslim and Hindu for their purposes and installed the Brahmin caste, the priests, as local substitute rulers. To increase their power and in resistance against muslims, they started the "cow protection societies" and created a "cow shed fund". Until then, the sale of cows to non-Hindus and slaughtering was allowed
The muslims retaliated by slaughtering cows in more provocative ways. In 1893, 45 cow protection riots caused 107 death in different cities.
Gau Mater's (mother cows song):
Living, I yield milk, butter and cure, to sustain mankind
My dung is used for fuel
Also to wash the floor and wall
Or burnt, becomes the sacred ash on foreheads
When dead, of my skin are sandals made
Or the bellows at the blacksmiths furnace
Of my bones are buttons made
But of what use are you, O man?
The bulls were also necessary as work-force, and the animals in the streets took care of most of the garbage, which at that time was mostly organic... the food was served in leaves and eaten by hand
Nowadays you frequently see cows chewing plastic bags and digging in garbage cans.