There were many, many reasons factories moved away from the US, one of which was the profit margins on goods, which actually is complex and directly influenced by the way taxes/accounting/finances are done in corporate America.
Don't get me wrong, greed has been a major, if not the major motivator, but there were so many people either asleep at the wheel, or actively driving us towards the outcome we have today.
I would say the number one thing people do is they don't allocate overhead or things like shipping/logistics/lead times into the total costs.
Like for example, if it takes 3 months to have a product, you should store more inventory than if you were doing it in the US. You also shouldn't just look at just the raw unit price, you factor in shipping, quality assurance checks, inefficiency of engineering changes, etc. which many people don't actually do.