That's not necessarily how the US civil court system works. Courts will sometimes throw out or alter contracts if a good-faith mistake by one party produces a result that would violate the fundamental principle of equity. This is more likely if the result appears to violate the original intent of the contract.