It’s something that is supposed to enhance his reputation. He can claim to have been a “presidential candidate”. This is supposedly helpful for when he writes a book, and/or gets a gig on some cable news channel.
These guys do not believe they have a snow ball chance in hell of actually getting the nomination.
The same is true of the clown car of Democrat candidates. Most of them know deep down they have no chance at getting the nomination. But it enhances their resume, for the same reasons, for when they write books and get a gig on MSNBC.
Someone is paying him, or he is hoping to be paid, perhaps through campaign contributions.
There are oceans of money anti-Trump.