Inexperienced at building satellites with optical lenses, Boeing started missing deadlines and exceeding cost estimates almost immediately. By the time the Pentagon took the program away from Boeing in 2005, it was five years behind schedule and had cost $10 billion, including $4 billion in cost overruns. For contractors, this sort of failure is seldom punished — it’s often rewarded. Many contracts are “cost plus,” meaning there will be no penalty if a contractor wildly exceeds the initial projection. Better still, a contractor can break something, then bid for the job of putting it back together. When the N.S.A. wanted to create another program, ExecuteLocus, to replace Science Applications International’s failed Trailblazer, it needed a contractor to build it. Who got the job? Science Applications.

The orthodoxy of privatization — that it’s the government that’s mired by inefficiency and a lack of competition — has been turned on its head in the intelligence industry. However patriotic, contractors must ultimately answer to their shareholders and the bottom line. There’s more than one way to read Lockheed Martin’s recent advertising slogan: “We never forget who we’re working for.”

It’s not just the money that flows out the door, either: it’s also the people, as the companies offer hefty raises to government employees who join their ranks. A recent report from the Office of the Director of National Intelligence found that “contractors recruit our own employees, already cleared and trained at government expense, and then ‘lease’ them back to us at considerably greater expense.”

This process — called “bidding back” — has created a brain drain. Two-thirds of the Department of Homeland Security’s senior officials and experts have departed for private industry. Michael Hayden, the C.I.A. director, worries that his agency has become “a farm team for these contractors.”

The revolving door helps firms score more contracts. Federal law prohibits executive branch officials from lobbying former colleagues after leaving public office — but just for the first year. Can a government acquisitions officer who might someday like a job at a contractor really evaluate the contractor’s bid objectively?

William Black Jr. left the National Security Agency in 1997, after a 38-year career, to become a vice president at Science Applications. He returned to the agency as deputy director in 2000, and shortly thereafter the Trailblazer contract was awarded to his former employer. Nothing illegal here, but is there not at least the appearance of a conflict of interest? The good news is that Congress seems to have finally caught on to the scale of the problem. The intelligence authorization bill that passed the House last month included an amendment that would require the director of national intelligence to submit a report on the functions performed by contractors, the ways contracts are vetted, and the savings associated with outsourcing. The Senate Intelligence Committee explicitly chided the spy agencies earlier this month for “increasing reliance on contractors.” In response, the C.I.A. announced that it would pare the number of contractors by 10 percent.