I'll argue that the branding issue is a distraction. Shoppers generally understand that Home Depot, Walmart, etc. don't make or comprehensively vet everything they sell, yet they still stand behind the customer experience via returns and support. I find holding Amazon to a higher standard of product vetting as compared to other mass retailers a difficult position to defend.
Holding them to exactly same standard as all retailers. It seems US and EU law may be vastly different on this front. Here it's the retailer held responsible for problems, so it's in their interests to vet as a normal part of the buying process, and they do.
New Company will find product looked at to decide if it's worth putting in the stores, that they meet electrical safety or whatever laws etc.[1] Only once approved will they be placed in store. They'll probably trial in just a few stores first. At least some retailers have an audit process for the factory too.
[1] https://www.homeretailgroup.com/suppliers/how-to-be-a-suppli... 80,000 lines, they say they assess all products, and mention lab testing and pre-shipment inspections. They're a mass market retailer with a lot of product at the cheaper end of the scale.