Because they've
been through this process as part of learning math. e.g. you read your analysis book, and come to:
> If a set E in R^k has one of the following three properties, then it has the other two:
(a) E is closed and bounded.
(b) E is compact.
(c) Every infinite subset of E has a limit point in E.
You stop reading, and you figure out the proof. Once you're satisfied, you continue reading the book and compare with its proof. The people who managed to get far enough that they were doing research have almost certainly gone through this exact process. They've self-selected as individuals who are able to motivate themselves to learn things even when they're already known, and to be able to figure things out without being given the solution. There's an insane amount of math to get through to get anywhere near the frontier, and it all builds on itself such that you can't just skim and skip, so they
must have already learned to be able to do this.
Likewise, when given an exercise of the form "Prove P" or even "Prove or disprove P," you can be pretty certain 1. it is doable and 2. it is doable using techniques/theorems discussed in the course/book you're working through. But people are perfectly happy to do this for several years.