Amazon is AliExpress with a domestic retailer's markup. At least with Walmart I know that when they stock something on their shelves, they care about liability and bad PR.
This. At any brick-and-mortar store, the store itself takes some responsibility for the quality ("won't fail dangerously or slowly poison your children" quality, not "won't fall apart after a year of use" quality) of their products, if only because it's more clear that they'll catch some blowback from stocking illegal products in their stores.