Most often this will be you and people similar to you.
Less often you build it for a friend and people like them, or an organization you care about and organizations like them.
The replies that suggest just yourself, people like you, friends etc don't provide satisfaction to those people who gain the most satisfaction from building things large numbers of other people want to use and ideally enjoy using.
I'm happy to write/build little things for myself, friends and other small groups up to a point. But the motivation is limited. I don't see myself putting in 1000 hours polishing something like that, as it feels like a waste of limited lifespan. It's just not fun.
Whereas I'll happily put in 5000 hours to a project that I feel is, or could be, making a noticable, useful and liked difference to the lives of millions of people. It some level of psychology that's satisfying, a kind of deeper fun.
Don't ask me why it makes a difference how many people are affected. I don't have a good answer.
I know there are many people who don't feel this way, because they say so. But it seems to be how some people are wired.
But there's that pesky scaling problem.
So which people and which projects to focus on?
I think it's a dilemma that a lot of people struggle with in times of creative freedom who are wired that way, and I have yet to recognise any really good articles or guidance on resolving it.
Here is an historic example: the GIMP. AFAIK the original purpose the software was intended to serve was to create merchandise, I think post cards, from fotos to sell at a stand.
Compare that to Photoshop whose original intend was to make images ready for print production, you see two very different set of users.
Photoshop filters got their name from studio lightning filters, a technical term completely logical to it's intended audience. Everybody who did movies/fotos in the pre-digital era new what a filter was. This naming made the Photoshop menu and concept intuitive, thus raising it's usability.