Having to throw away code isn't the primary cost of building the wrong thing. The impact of the software misbehaving, and the need to maintain backwards compatibility are much worse.