Congressmen sometimes force buys on DOD so that industries in their home state will benefit. This is called "Bringing home the bacon."
More likely is that the Air Force contract is poorly written. Lockheed is meeting the detailed requirements as written, but Air Force oversite is looking at the broader preliminary requirements for the aircraft and determining that it doesn't meet the demands set out before bidding took place. The Air Force's contracting officer probably sat down with Lockheed and worked out a deal to bring the aircraft up to broader operational requirements outside of the aircraft delivery contract.
The contracting officer probably sat down and worked out an agreement to pay Lockheed even more to do what they were supposed to have done in the first place. At least, that is what I've seen contracting officers do in the past.
As Sherlock Holmes said, "Cui Bono?", (who profits?).
Follow the money, it leads to the perp.