What risk is there?
* If you fail to grow, the investors lose their money. But the company still exists afterwards.
* If you succeed, you still get many benefits.
You're risking __someone else__'s money. And they're not even asking for the money back, just equity. In fact, a common scheme is to take the money, pay yourself, and do nothing. (Slightly fraudulent, but its really hard to tell the difference. Ex: all the yachts that
Adam Neumann bought when he got investment money for WeWork).
As the CEO, you still get the salary, and that salary comes out of the investment money. So at a minimum, you often give yourself a raise for convincing other people to give lots of money to your company.
--------
There's also something to be said about cashing out. If you're tired of the grind of building a company, you can sell out and make $100s millions or $Billions with a company like this.
Ex: Notch burned out and dropped off the grid after a few years of Minecraft development. He took the $5 Billion offer from Microsoft and then largely disappeared. I don't think anyone can blame him, indie developers at heart don't want to deal with the politics of leading a 10+ million video game players.
Seeking investors is the path towards cashing out and retiring. You need to find a new owner of the company, and selling your stake / equity to them is a major step towards retirement.