You do. The scale of those costs, and whether those costs outweigh the cost of planning everything before you start, may vary depending on a variety of things, such as the structure of your development teams. But there's always a cost.
At the simplest level, 5 days of coding something that you realise doesn't do what you want is 5 days you'll never get back.
At places like mine, where you've got multiple third parties that you're interfacing with, sending them off to develop something before being 100% certain that they are doing the right thing could - and reasonably frequently does - have many thousands of pounds of cost implications, and many months of delay, when you realise that a particular call needs to real time instead of batch for example.