Building things for yourself is the most satisfying type of programming I do. At this point my personal projects have outlasted most of the paid work I’ve done for the past decade. I’d be surprised if any code I’ve been paid to write has survived more than a decade, and it certainly wouldn’t surprise me to have code that has lasted less than 3 years. The best part about writing code for yourself is you get to solve your own problem, on your own timeline, with the technologies you want to use, with the level of quality that you find acceptable.
I suspect this is why so many of the solo technical entrepreneurs tend to be happy despite long hours and the odds stacked against them for success.