This is a re-post from /r/history but this is a serious question I've been pondering about.
I'm only asking this because I know that when these seashells eat microscopic organisms such as algae and store the toxin produced by the algae in their body. Nowadays I'm sure we have modern chemical testing kits or some sort of way to test for the toxins.
I'm just wondering how did ancient people eat seashells back in the day without dying? Or did they simply never know about the toxin and assumed it was another disease or they did a "ingest a little bit" and see what happens?
I don't know what people did in the past, and I'm no historian, but your assumption that shellfish today are generally tested for toxins before being sold and eaten is mistaken. In fact, if you want to, you can just go find some yourself and eat them right away.
I don't know about shellfish toxins, but I do know about shell mounds. Shellfish was definitely consumed in massive quantities in prehistory in the Americas. Presumably (this is a total guess, as I mentioned I don't know much about shellfish toxicity) the percentage of shellfish that are extremely toxic is so low as to have no effect (or little) on the decision to use them as a food resource.
I have read that the Judaic law prohibiting the consumption of shellfish may be related to how unsafe shellfish can be as a food source. This may be a case where a religious law is based on hygiene and food safety rather than any supernatural imperative. I apologize that I don't know the source for this off the top of my head, I can probably hunt around for it if anyone is interested.