Cost estimation is always one of the trickiest part of any new project. I wonder why this is so. Do you think majority of projects nearing their completion make everyone realize that the initial cost estimation was way off course?
Cost estimation is tricky because of the unknowns in schedule: material deliveries, late alternative make or buy decisions, amd the unknowns in testing. Often one has to pay workers who are idle while things get fixed, this costs a lot. I don't think initial cost estimates are "way off course", but there must be bounds on the cost estimate. Many, many things can happen to schedule, which affects cost.