The thing is, we see this sort of pattern of religious practices ultimately lining up with legitimate health concerns in almost all religions. So it makes a lot of sense that it evolved, unintentionally to that purpose and they just thought it was god giving them a sign.
When people ate meat that was on the verge of death when it was killed they got sick and diedd themselves. When people ate healthier meat they lives. Overtime superstition arose that it was just god wanting people to do this or that, and it largely reflected the health, though that was never an intentional decision. It happened naturally as the consequence of their superstition.
We see the same in christian religions. For example people quickly noticed that people who drank beer were healthier than people who drank water. This was thought to be some magical gift imparted on beer by god. This is why the Catholics have saints specifically associated with beer and why it was routine for most churches to brew their own beer as part of a monk's duties, which they viewed as sacred. Even today many ales have long traditions and still brewed by monks (like trappist ales).
In reality it was just because the boiling process associated with making beer killed off many of the germs so fewer people died from it.
Due to the whole 'An animal has to be clean' it means that the animals needed to be kept healthy, they needed to be kept humanely, and they needed to be kept in a clean environment where they weren't being abused.
I can't say if the original intent was to give the Proto-Jewish people of the time a cultural connection through food, or if it was health related or anything else, to be honest. I don't think it's something we know, and due to the nature of culture shift I'm not sure it's something we can know unless some bit of archaeological evidence pops up that specifically lets us know about it.
As far as religiously held dietary laws go, I feel kashrut is mostly benign.