Paul W. answered 04/09/19
Dedicated to Achieving Student Success in History, Government, Culture
It's my understanding that a number of religious dietary restrictions originated as practical measures concerning the sources of food.
I recall a book that I was assigned as an undergraduate in the 1980s (I'm afraid that I don't recall the title or author) that offered explanations for the Jewish ban on the eating of food produced from pigs and the Hindu ban on the eating of foods produced from cows.
If memory serves me, the explanation offered by the aforementioned book concerning Jewish dietary restrictions was that pigs were too dangerous to keep in the Levant. According to the book, the Levant has a very hot climate (presumably during summer) and, because pigs don't have sweat glands to cool off their bodies, they use the alternative of relying on their waste - urine and feces - to regulate their body temperature. This, in turn, presents a health hazard for human beings living in close proximity with pigs (at least in an inordinately hot climate). The peoples of the Ancient Near East may not have been aware of germ theory, but they appear to have understood that there was a connection between the filth of pig pens and sickness among humans.
As far as I understand it, when Mohammed left his homeland of Mecca for the town of Medina, an event that is known among Muslims as the Hijra, he courted the support of the Jewish community in Medina. In an effort to convince the Jews in Medina to recognize him as their political and religious leader, Mohammed adopted the dietary restrictions of the Jews. While the Jews of Medina spurned Mohammed's efforts, the dietary restrictions became a feature of Islam.
Again, according to the aforementioned book, the Hindu dietary restrictions concerning the eating of the flesh of cows was based on the need to preserve cattle to ensure the survival of the community. This originated with the original Aryan invaders (admittedly, a controversial subject). The Aryans are believed to have been an Indo-European people, speaking a language from a family of languages known as Indo-European. The Aryans were semi-nomadic and relied heavily on domesticated animals: horses for transport and use in war, cattle for sustenance. But it was not the flesh of cattle (except, perhaps, for injured cows or old cows who not longer gave milk), it was what cattle produced that provided a source of food: milk, curds, yogurt, cheese, etc... As such, to kill a cow was literally to kill the golden goose. In addition, cattle produced more cattle, increasing the wealth of their owners (cattle even produced a vital form of fuel; dried manure works just as well as wood).
Of course, once the Aryans had consolidated their control over what is today Pakistan and northern India (a process, like their 'invasion', that took place over centuries), they also began to rely for food on the crops that were grown by the peoples who already lived in these regions. But the restrictions on the killing of cows, originally a practical measure born of the necessity of a semi-nomadic lifestyle, remained in place.
I cannot speak for Jews, Muslims, or Hindus - I do not belong to any of these Faith communities - so I cannot say what the reasons may be for following these dietary restrictions. Nevertheless, if the explanations from the aforementioned book for the origins of some of these dietary restrictions are correct, one thing that can be said about the observance of these dietary restrictions is that they are not based on any practical / pragmatic reasons.