Pork harbors parasites, or can, including tapeworm. Shellfish (especially in a heavily populated area with questionable sewage treatment) will pick up fecal colliform and other bacteria, as well as concentrate any heavy metals from industry.
In Old Testament times, either could have been a health hazard.
Swine also can present problems with handling and herding, and will eat human flesh, as well as act as a reservoir for viruses, most notably the flu.
There are many reasons the dietary laws made sense.
But, then, there's Bacon...
Bacon...yes, the true test of Judaic faith. There are so many bacon workarounds nowadays like Turkey Bacon that it seems silly. So you manufacture a food substance that looks, feels and tastes what is forbidden. That's like a Vegetarian eating synthetic soy protein in the shape and smell of a burger.
I could never figure out why there are so many Chinese restaurants in Jewish neighborhoods or for that matter, why Deli joints serve the Reuben sandwhich, (corned beef, sour kraut, melted Swiss cheese on a grilled toast. That is about as non-Kosher as you can get but DAMN, they taste so good! My mouth is watering just writing this...