It's hard to make new laws to address specific problems with Amazon and at times it acts like both; sometimes it's mostly a marketplace and other times it does things like mixing inventory that make it more like a retailer (in the sense that they're presenting a unified front for multiple suppliers).
You're misreading the ruling. The ruling is for state law not federal and says the following, "The Appellate Court didn’t agree with Amazon’s stance. It noted that the product had been listed on Amazon, was stored in an Amazon warehouse, had payment facilitated by Amazon, and shipped it out in Amazon packaging, proving it to have a hand in getting it to Bolger and thus liable under California law." So, this stance will change depending on the product and what law is being alleged to have been broken.
Meanwhile, https://news.ycombinator.com/item?id=24174276
"Amazon Liable for Defective Third-Party Products Rules CA Appellate Court"
It seems both regulators and Amazon want whether or not it's a marketplace to go both ways whenever it's convenient.