They'd rather spend $2b to get a 97% likelihood of a positive outcome, than $1b with an 80% likelihood.
Time is a big deal when you're going to spend a decade on a project. NASA will have a ~$250b budget for the next decade. The people that they have access to to work on projects, are finite however. Their lifespans are finite, how much time they're willing to spend on one thing is often very restricted, and just nailing them down for a given project can be difficult. There are a lot of other things they can be doing with their time. You want to get things right the first time and not spend five years doing it all over again (and more likely, the project is simply cancelled). NASA's budget being sizable, gives them some flexibility on spending more to increase positive outcome chances.
It's better to spend $10b on James Webb (if necessary), than $3b with a meaningfully higher chance of failure. If it fails at the lower budget, they still won't do it all over again, it'll just be dead. It'd be a massive loss of time and potential.