If your wife comes home after spending $2,000 on 10 pairs of shoes and justifies spending such a huge sum by saying each pair was cheaper by buying in bulk that doesn't make everything copacetic: she still spent $2,000.
The correct analogy would be: The husband had already approved for the wife to go buy a set of shoes for $2000. After the first purchase she could get additional pairs of the same quality for only $1. She then comes home with 100 pairs of high value shoes for $2,100.
The development cost for the update was already funded for the current fleet ($2000 first shoe purchase) installing the software update on the jets is the $1 additional pair of shoes.
If 400+ F-22 were originally purchased it would not surprise me if the fleet was kept in service until 2050. Fitting new systems would now be much cheaper per aircraft that it makes sense doing that compared to purchasing an F-35 for that role.
Don't you have something better to do on a Sunday?
Firstly, you're assuming the RoI is so severely lopsided, but it's not. Secondly, updates must be continual and those updates all have costs that aggregate over time as the technology obsolesces: an update in 2005 will cost much more in 2020, and much greater still in 2030.
Besides, the more correct
analogy would be that those 101 pairs (1 $2000 pair + 100 $100 pairs = 101 pairs not 100) didn't turn out to be the shoes you thought you'd purchased: they look amazing and are perform great, but they're difficult to put insoles in, the strap constantly breaks, and are overkill unless worn with formal gowns to events you and your wife never attend anyway. On top of that, your friends can't purchase them to help lower the price so you're stuck with all the purchase and repair costs. In the years since you agreed to buy them you have a few children and your wife loses her job so money is tight. In addition, you've found much cheaper shoes that can be worn on a daily basis and can be purchased in bulk by her friends, too, greatly lowering the purchase and sustainment costs. Do you buy more of the expensive shoes when she says "but they're so cute!" or do you force the newer, cheaper, more versatile shoes?
I can go all day with this, but I doubt anyone truly wants that.