why has the US supported sending jobs to china which is a potential economic and millitary foe? or are the 2.7 million jobs in china just leverage for cheaper trade or some diplomatic leverage?
In order to understand trade with China, we need to first look at sources of international trade competition.
Absolute Advantage: A nation has an absolute advantage when it is able to produce most everything more cheaply than its trade partners. For example, if a nation has a LOT of people competing for jobs, then wages are very low and the cost of production is also low. This is the case with China.
Comparative Advantage: A nation has a comparative advantage when it can produce certain things more cheaply than its trade partners, and no absolute advantage exists. In other words, where two nations are good at producing different things, so they each focus on producing only the things they are good at, then trading for the other things they need. For example, India can produce medicine more cheaply Taiwan, but Taiwan can produce electronics more cheaply. So they each produce more than they need and trade with each other, to make everything cheaper since they are each meeting their needs at a lower price than if they both tried to make everything.
Money: Money is just debt. We provide services to society by working, but the company you work for can't provide you with food, clothes, housing, and everything else you need. So, instead, they give you an I.O.U. for whatever resources you want called money. Then, once you give that money to someone else, if they want what your employer makes, then they can give that money back to your employer. It's all a big circle. By itself, though, money is completely useless. What gives money value is the resources that you can buy with it.
So, when you think of trade with China, think of it as a big discount coupon for everything we buy. We get all sorts of resources from China for very cheap, then use those resources to produce our own goods more cheaply than we otherwise could. Don't forget that, even despite being the world's largest importer, the US still has the largest economy in the world.
I know that doesn't provide much comfort, but there's more. After 2007, the US and many Western European nations saw a period of deflation; wages went down, costs went down, property value went down, etc. During that same period, China saw increasing inflation; costs went up, wages went up, etc. Also note that the inflation in China is higher than it should be because China is artificially keeping the value of their currency down, increasing total demand and driving up prices. On top of that, they also have the world's largest population entering retirement. So, while their wages and costs continue to climb faster than the US, production and trade will start to shift the other direction. It's already started; China's economy is slowing, the US economy is picking up. China has the 2nd largest reserve of US dollars and they still see it as an investment because they believe the value of their money will buy them more production resources from the US than the US paid. Even if they use those dollars to trade with a 3rd party nation, those dollars are coming back to the US eventually in the form of investments or purchases. In either case, it will contribute to improving employment and production.
This phenomenon even has a name: factor price equalization. That means that when two nations trade together, over time their prices will equal each other. That is what is happening between the US and China; price equalization. Once the absolute advantage from low wages disappears, then the trade between the two nations will focus almost exclusively on the goods that each nation has a comparative advantage in.
Ok, so what happens when we stop trade through protectionist policies? Let's look at the Volga as an example. The Volga was a car produced in the Soviet Union. When the Soviets cut off trade with the US, the Volga was the only car manufacturer able to meet demand for cars throughout the Soviet Union. The problem was that they didn't have a comparative advantage in that, so they had to use more resources than the US to make the same amount of cars. This resource allocation inefficiency drove up prices, drove down quality, and decimated the Soviet manufacturing sector as a whole. It caused huge shortages and other production problems. This same sort of thing has happened to the Soviet Union, North Korea, Iran, Cuba, Australia, the United States, Germany, Japan, China, and others.
Still, trade itself doesn't usually eliminate jobs. In the US, companies like Ford and GM shipped many jobs overseas, but more successful auto companies like Toyota opened assembly plants in the US, like the one in western Indiana, and another somewhere in rural Georgia. The real loss of jobs comes more from technology. During 2007, at the height of people being angry about Chinese outsourcing, China actually lost more jobs than the US because they were shifting to machinery and computers. The truth is that as we improve our technology, we are able to produce enough, now, to meet demand. In other words, we don't need everyone to work because we are able to make enough "stuff" without full employment. We're doing it right now, in fact. Unemployment is still high, and wages are still low, but GDP and corporate profitability is back to record highs. So, what's the next step, then? What happens as technology replaces jobs? That's still under debate, even among economists, honestly.
I hope that helps answer your question.