You are making the false assumption that humans are always being intelligent on every issue. The Jewish and Islamic rules are purely arbitrary and assume that all kinds of animals(dogs/pigs etc.) are somehow "unclean" without any scientific justification whatsoever. The dietary rules in Jewish and Islamic law are laughable, with no innate logic within them. Things like banning anything with cloven hoofs or whatever nonsense. Fortunately, it seems that kosher and halal are largely incompatible with a RVAF diet in terms of general guidelines, so that is a cheery thought.
Oh, and from wikipedia:-
". Although some of the laws of ritual purity roughly correspond to modern ideas of physical cleanliness, many of them have little to do with hygiene. For example, there is no evidence that the 'unclean' animals are intrinsically bad to eat or to be avoided in a Mediterranean climate, as is sometimes asserted."[19]"
Basically, religious sects of all kinds have made up absurd laws to control everything a person does re eating, drinking, sexual activity or whatever. That does not make them logical, it just means they want to be separate from the rest of the herd, by making up all sorts of nonsense.