Yes, but that's probably the wrong physical analogy. Has a mall ever been sued because one of its stores sold illegal and/or deceptively advertised goods? I seriously doubt it. Now a mall (or Amazon) might kick a seller out if there are problems. This absolutely happens, but it's not very visible, and only occurs after the fact.
Amazon have been so successful integrating stores into their site that customers don't realise who they're buying from.
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.
In fact, no retailer does this. Consider any direct seller of a wide assortment of retail goods, e.g. Home Depot, Walmart, etc. None of these have rigorously "vetted" every item that comes through their doors. They certainly get problematic goods, and deal with that after-the-fact two ways: to purchasers via customer returns and support policies, and to suppliers via feedback into their supplier relationships (give us bad stuff, our $$ go elsewhere; contracts; etc.).
The idea that a retailer should be held a priori accountable for third-party goods it sells smacks of the same kind of thinking that suggests ISPs should be held accountable for third-party content flowing across their networks.
Physical stores have to meet quality and legal requirements on sale of goods and what have you. The retailer can be sued if something isn't as described, or fit for sale. Things can and do get pulled. Mistakes are of course made.
Selling a bunch of stuff under the Amazon brand but disclaiming everything (take it up with the seller in China) except their own supply has taken it a little far. They became ebay but somehow still carry the trust "even Amazon".