There's only one piece of software which (with adaptations) runs every Airbus plane. The cost of developing and modifying that -- which is enormous -- is amortized over all the Airbus planes sold. (I can't speak about Boeing)
What failed today is a bunch of Windows stuff, of which there is a vast amount of software produced by huge numbers of companies, all of very variable quality and age.
We're talking about critical software. If we can't afford to reach the level of safety needed because it's too expensive, well so be it.
Besides, the enormously expensive flight systems don't seem to make my plane ticket expensive at all...