When I was in college, I took a comparative literature course on the Abrahamic texts.
My takeaway? They are anthologies of the public policy, health laws, and ruling structures of the time.
The begats? Establishment of primogeniture.
Pork consumption? Trichinosis, plus they are the grossest form of omnivore and expensive to raise.
Wool and linen? Reserved for the clergy, like a police uniform. On a more practical level, uneven shrinkage.
The commandments? Yeah, laws. 🤷