Exodus 22

Exodus 22:31

"And you⌃ shall be holy men to me; and you⌃ shall not eat flesh taken of beasts, you⌃ shall cast it to the dog."
Is the law contradictory about eating carrion?

A careful reading tells us otherwise. The Exodus verse refers only to animals that are mauled by other animals and have died. Deuteronomy refers only to animals found dead of natural causes. Leviticus refers to both types and tells what to do if someone (whether native or stranger) consumes such an animal in spite of the rule against doing so. The stranger of course would have to decide whether it would be worth it to have to do the washing ritual in order to eat the animal—chances are, in their age before there was a supermarket on every corner, they wouldn't have minded.