Re: Sea change in "allowed" foods
It's the allowed ruminants that eat grain (along with grass). Pigs (omnivores) can eat many different foods and are probably kept at living garbage disposals, but because of this they're considered unclean (probably with a history, again because of Trichinosis).
Reading up on the different food-based restrictions, you realize they mostly (the exceptions being the ones banned due to ritual like the yeast/Passover restriction) generally have a logical reason for restricting them: especially at the time, all the foods listed are potential sources of contamination, parasites, or disease (including blood). A lot of the banned creatures are considered scavengers and so would be thought to accumulate toxins from the food they eat.
I won't comment on the other restrictions as I lack the perspective to see any logic behind them.