Probably because doing so would mean a lot fewer product categories. It's a trade-off, to be sure. But if you need that odd thing — a screw of a certain type, a power supply that's 56 volt DC or whatever — then if there's only going to be sold, say, a few thousand of those a year, if Amazon was required to do product safety testing on them, they probably wouldn't be able to sell that category at all. And so the trade-off is they are not required to.
Now that's very different from "we are selling things that we know, or have good reason to know, specifically are dangerous" — here they might very well be liable.
Now that's very different from "we are selling things that we know, or have good reason to know, specifically are dangerous" — here they might very well be liable.