Mary Douglas' book "Purity and Danger" discusses this very issue.
Her theory is (as i recall) that god created
1: flying creatures of the heavens
2: fish of the sea
3: domestic animals and wild animals according to their kind
4: creeping things of the earth.
The ancients then only viewed as clean those creatures which unambiguously fitted in with their classes of these animals.
eg - a chewer of the cud had to have cloven hooves like the clean cow. Hence rabbits could not be eaten.
A pig has cloven hooves but does not chew the cud, unlike a cow ergo unclean.
Fish have scales - no scales: unclean: eels and shellfish.
Creeping things of the earth must have leaper legs eg locusts. unclean millipedes scorpions etc.
Carrion birds fed on dead flesh rather than what other birds fed on, thus they in some respects resembled scavenger animals like the dog.
In other words any creature which blurred the distinction between the various classes of created creatures was viewed as unclean because it posed a threat to the universal order they thought god had made.
Anyone eating their flesh would be taking disorder into their bodies: "YOu are what you eat."
HB