It’s interesting to see people today try to back-justify Jewish ritual purity laws that existed at the time without justification.
Abstaining from pork at some point in the misty past became ritually forbidden, for reasons nobody wrote down and likely nobody remembered after a few generations.
As traditions sometimes do, this one stuck.
Nobody remembers why wearing garments made of both linen and wool was such a big deal either. But it was also ritually forbidden.
But I have to laugh when I hear conservative Christians and Muslims (most Jews seem to have slightly more nuanced views) insist God’s ban on pork shows how good God was at protecting his people.
Sorry, but as you so well point out, that just doesn’t hold water. Heck, a certain small civilization in the Yellow River valley were at about the same time subsisting on pork.
They seem to have done OK for themselves.