Sellers of new products are in general strictly liable for harms those products cause to consumers. "Strictly liable" means that the consumer doesn't need to prove who was at fault (the seller vs. the distributor vs. the manufacturer, etc.). If you buy something new and it hurts you (assuming it isn't your fault) you can sue the seller. The seller can sue the manufacturer/distributor/etc. (or bring that party into the suit against them) and indeed, the contract between Amazon and third-party sellers includes a clause that these sellers will indemnify Amazon.
There are a few reasons for this general setup. Sellers are good "insurers" in that they typically sell a variety of products to a lot of people, and can thus spread risk reasonably well. Sellers generally know where they get their products, so they can pursue that party for the liability; consumers aren't in as good a position to do so.
Amazon wants to not be a seller, so as to avoid liability.
The actual decision [0] explains this concept in a bit more depth, starting on page 9.
[0] https://law.justia.com/cases/california/court-of-appeal/2021...