A recent report by the University of Manchester claims that Apple could afford to build iPhones in the US and still profit. According to their findings, Apple would make a gross margin of at least 50 percent on the handset.
Of course, as TUAW points out, that would still be less than Apple is making right now. They also say that the current setup works for Apple and stockholders, but doesn’t necessarily help the US economy and only does a bit for China. That said, there is still a lot more to it. As commenters pointed out on the report, one major problem is workforce. China has enough people to do it. On top of that, they have the manufacturing capabilities. Building such an infrastructure in the US would be more than costly.
Also, as we heard last week, China has the natural resources needed for many of these devices. Mining for many of the materials used in consumer electronics is big in China and export costs can be avoided by keeping manufacturing there.
It’s a little bit of everything, and the answer doesn’t come down to one thing.