C4ISR Journal/Defense News's Aram Roston has written this outstanding piece on the Pentagon's efforts to secure foreign hardware for analysis. Roston shines a spotlight onto the secretive world of the Pentagon's Foreign Materiel Acquisition and Exploitation program--it's a story that's well worth reading in full.
"You have to know your enemy in order to defend yourself against him," Roston quotes one former government official. "And you can't know your enemy unless you can replicate his abilities and train against them. And you can't do that unless you can acquire his advanced technology."
This sort of thing isn't exactly new. Militaries around the world have been doing this sort of thing for decades. After World War Two, for example, the United States, the Soviet Union, the UK and France helped themselves to Germany's military advances in fields such as jet engines and rocketry (look up Warner von Braun).
Later, the US flew a Soviet-built aircraft, both for test and evaluation and for air combat training after the Vietnam War, for example. No doubt the other services did similar things, though a fighter is a lot easier to steal than say, a ballistic missile submarine a la "Hunt for Red October". It's also likely the Russians tried to do the same thing to us in return.