Why Did God Proclaim Certain Animals Unclean?

The list of unclean animals in the Old Testament is often confusing. Why did God forbid the Israelites to eat wild rabbits while allowing them to eat sheep? Was there any logic behind this? Was it totally random?

The Epistle of Barnabas (AD 70-132) offers an interesting theory. Barnabas wrote that certain animals had specific associations attached to them, and that the Israelites were told not to eat them so as to avoid the negative character traits they exhibited.
"Moses spoke with a spiritual reference. For this reason he named the swine, as much as to say, 'Thou shalt not join thyself to men who resemble swine.' For when they live in pleasure, they forget their Lord; but when they come to want, they acknowledge the Lord. And [in like manner] the swine, when it has eaten, does not recognize its master; but when hungry it cries out, and on receiving food is quiet again."
If you "are what you eat," then you don't want to eat pork. You'll end up becoming an ungrateful pig. You'll become swinish.
"Moreover, 'Thou shall not,' he says, 'eat the hare.' Wherefore? 'Thou shall not be a corrupter of boys, nor like unto such.' Because the hare multiplies, year by year, the places of its conception; for as many years as it lives so many it has. Moreover, 'Thou shall not eat the hyena.' He means, 'Thou shall not be an adulterer, nor a corrupter, nor be like to them that are such.' Wherefore? Because that animal annually changes its sex, and is at one time male, and at another female."
The Israelites weren't supposed to eat hare because they have too many sex partners. The hyena was alleged to have been transgender. The Israelites weren't supposed to be adulterers or homosexuals, and thus God told them to avoid using these animals as nourishment.

It doesn't matter that these associations now seem absurd to us. It doesn't even matter that some of them, regarding the hyena, for example, are verifiably false. The Old Testament was meant to be a giant object lesson in purity. God met the Israelites where they were, and he used their superstitions to create a law with deeper spiritual meaning.