the most often given explanation for this is that since shellfish can carry dangerous pathogens Yahweh ordered the early Israelites not to eat them.
as i understand it the view of most scholars is the explanation at #1 in doone's list. the hated Philistines ate lots of shellfish and so it was simply a way for the Israelites to set themselves apart from their enemies.
any person who insists on the traditional explanation would have to explain how the Philistines ate lots of shellfish without adverse effect. why too didn't Yahweh simply include instructions on how to safely consume shellfish without denying the Israelites such a valuable food source so rich in nutrition? and if Yahweh was so concerned with the health and well-being of the Israelites why didn't he include instructions for good hygiene (thou shall wash your freakin hands after you go to the bathroom and before you eat...). finally, if, as some Christians would argue, disease and suffering are the result of The Fall, why would Yahweh curse humans with disease and suffering and then include instructions that would limit that disease and suffering by excluding shellfish from the Israelites diet?
the traditional explanation for the proscription against shellfish is the same as that for pork and fails for the same reasons. it is argued that, since undercooked pork is commonly the way that people are infected with Trichinosis, Yahweh told the Israelites not to eat it. but there again archaeological digs in Philistine cites have found no limit to the number of pig bones so it's clear that the Philistines did just fine eating pork. and why didn't Yahweh just tell the Israelites to fully cook the pork (thou shall cook the flesh of the swine until the juices run clear and there is no pink visible.). and so on. that it was simply a way for the early Israelites to set themselves apart from their neighbors is, to me at least, the best explanation.
I asked my favoite Aunt, Chovy -- and she said to quit carping about shellfishness because it gave her a haddock.
As a cultural materialist in archaeo/anthro, I tend towards Nelson's explanation ( which is the same as that of author Marvin Harris). Oh, Harris also mentions that pigs are expensive to keep in the arid environment that the Levant was becoming at that period of time -- pigs need quite a bit of water.