If memory serves, the initial B-2 force plan was for around 140 aircraft.
The canny Northrop contract negotiators insisted on language that obligated the USAF to pay for all non recurring program expenditures, irrespective of the number of aircraft actually purchased.
While that ballooned the unit cost to $2.2B as the quantity was slashed to 20, it also saved Northrop from financial disaster.
It is probable that various suppliers were not as foresighted and priced their parts on the assumption of a larger buy. They might be excused for declining to repeat the experience.