Some people will argue the issue there is time-horizons. If Boeing was worried about profitability indefinitely into the future, these sorts of repetitional disasters would factor in. But if everyone is looking quarter-to-quarter or year-to-year they won't.
The project timeline for the 737 MAX was at least 6 years. It was announced in 2011 and entered service in 2017. So you can run into this problem even when thinking 5+ years ahead.