So why do we need lasers, railguns, and stealth fighter jets to fight bands of rice farmers and goat herders?
Second, we are much more squeamish about losing American lives than we ever have been before. Any administration that chooses to throw bodies at the problem like we did in both World Wars will be quickly replaced. I can't defend every project (especially not the F-35), but by and large this tech is designed to maximize effect with minimal risk to American lives.
steve19 also makes the very good point that these weapons did fall into the hands of the enemy: most of the Taliban were trained by the CIA, and the weapons our forces faced in Afghanistan were largely ones we had sold to the mujahideen in the 80s. Now the weapons left behind in Iraq are largely in the hands of ISIS.
The point of this article is that the U.S. is likely to face similar asymmetric threats in any future war, where the opposition doesn't have the same weapons as us but they do have weapons that are very effective at countering us.
What seems to occur instead is that major powers fight via proxy wars, where they provide arms, training, covert assistance, and sometimes even open troop commitments on the soil of vassal states. This provides plausible deniability to the superpowers (neither of which actually want to see the world end in nuclear annihilation); offloads the human cost of the war onto foreign, less-developed countries; offloads the political cost onto puppet governments that can be disposed of when no longer needed; and prevents widespread public discontent from threatening the ruling government.
Just because the war is likely to happen in the Persian Gulf or Sea of Japan doesn't mean that the weapons & tactics involved won't be developed by first-world nations.