Other than food and a few other things, there's no reason why local production is any better. Global transport is cheap and expertise is spread out.
I think there's two reasons many products are crap quality:
1. Consumers only care about price
2. Amazon deliberately confuses consumers about quality, e.g. by allowing fake reviews, deceptive marketing, not having expert reviews, and not having objective filters for quality
(2) was a bit better when local retailers still existed that actually knew what they were selling and could vouch for quality. Though there plenty bad sales incentives there too.