You do so knowing full well that you can be successful by failing thoroughly. At least you can prove that something wasn’t possible. It doesn’t always have to end well, provided what you did was done with sincerity and thorough effort. I guess that is in part the essence of science. You have an idea, you set it up, you set out to prove it, and if you work hard enough at it, you either do prove it, or you prove it utterly is wrong. That’s not quite as satisfying, but it’s also satisfying to get to the truth, and the truth doesn’t always have to fit with what your preconceived concept was, and I think that’s important.