I suspect it has more to do with historical misunderstanding of food born pathogens.
Some animals or animal products are more prone to being contaminated.
I've an mostly iron clad digestion thought and in 49 years of life I don't ever recall having anything like food poisoning, despite eating some pretty sketchy stuff that others wouldn't even touch, so maybe I am wrong.
Could just be superstition or economic, who knows.
The prohibitions on eating certain animals are extremely ancient and go back to the Shamanist cultures of Central Asia. Originally these were totemic prohibitions -- that is, you don't eat the animal that was your ancestor and that may carry the souls of your ancestors, because when you die, you don't want your clan members eating you!
Many of these cultures evolved to vegetarianism especially in India, southeast Asia, and China.
This was a first crude attempt to correct problems which caused death made by someone - a prophet trying to control society around him. Trouble is that it was not the pig that killed. Nowadays it is just better to find the real cause of death with science.
That's historically wrong. These prohibitions passed from one culture to another and began as totemic prohibitions.
The idea of not eating pork came from the fact that, in the past, pork was often infested with trichina worms. Eating trichina infested pork could result in severe illness, if not death.
Today, given differences in swine production and the quality of USDA inspections, trichina is no longer a problem.
Likewise, shellfish is a great way to get food poisoning if it isn't properly cooked. A few thousand years ago, with little understanding of what caused illness, it was probably considered reasonable to believe that God made you sick as punishment for eating something you shouldn't. We now have rational explanations (and better hygiene standards.)
Part of the reason was trichinosis, it was not understood until relatively modern times but they did understand the eating pork would sometimes make them sick. Modern cooking and livestock practices it's not a problem for us, in ancient times it could make people pretty sick.
The digestive system of pigs is different. For that reason they are not healthy to eat. I won't eat them because of the suffering being thrust upon them these days by commercial farming. It is a serious travesty. I won't be part of it. Likewise, I no longer eat any animals Chickens are tortured and kept in their own swill and are dirty to eat. Cows are fed cheaply with grains that they can't digest, making them sick and their farts are methane, a serious danger to the environment.
Pork bought in a grocery store or butcher shop is as safe as beef, poultry or fish. The taboo against pork, some fish and shellfish came about before modern sanitation and refrigeration and proper cooking methods and shellfish is monitored for water pollution I might shy away from it if you are in a 3rd world country. I think shellfish such as oysters are the most risky thing to eat.
also pigs being omnivorous pose a problem of prion diseases. I loved most seafood, won't eat oysters any more.
I think that the reasons for dietary restrictions came from the poor cooking conditions extant in the ancient world. Undercooked pork and shellfish would cause serious illness, and if enough people got sick after eating certain foods, the general consensus in those times was that sickness was caused by demons or pissed off god's. Other kosher and halal requirements seem to be based on similar possibilities.
I try my best not to eat pork. Pizzas are difficult to eat socially without pork. But pigs are pretty intelligent, it’s kind of like eating a dog. I’m not a fan.
As I understand it, not eating pork in certain tropical countries is due to the fact that pigs are utilized in places where plumbing is impractical. "Night soil" is thrown from chamber pots out the back doors and the pigs take care of it. However, then those pigs cannot be utilized for food due to the danger of passing serious diseases to humans.