In my experience the more expensive part of this when actual money is on the table is just the requirements gathering at the very beginning. I am saying that from the perspective of web, military, cloud, and infrastructure.
In order to see this as an actual concern you have to think about it only in terms of outside parties operating via contract. Do not think about this in terms of internal only at the megacorp because the financials are wrong almost every time.
Requirement gatherings and analysis is 90% of the job, software design is the other 90%. Once that's done, it's very easy to code the project. If it's not, take a step back and fix the error you've made at the previous steps (mostly due to a lack of information).
A lot of people think that coding is hard, but that's because they start to code too soon. And then the really hard activities get mixed in and it becomes a whole mess. Also it's quite easy to code, which is why inexperienced people usually rush to do it. Take someone like that and do proper software engineering, and for the first two activities, all you will get from them is a lot of "I don't know".