But what is code for? I don't know that I think there's any inherent value to code for its own sake. Just like I don't think a tool's value can be separated from what you do with it.
I'm not sure where the "profitable" part comes from. I know lots of people who have vibe coded little apps that solve a problem for them or their friends and family. There's no profit involved, but it solved a problem.
Can you give an example of a problem worth solving for which there is truly no demand? I don't understand that, because to me it seems like the demand is what makes a problem a problem. Otherwise it's just a state of being, and if there is no demand to change, whether yours or anyone else's, what makes it a "problem"?
But it doesn't have to be so brutally outcome-based as you're demanding, although you do get a ride on a steam train out of it too.
It's not entirely unprofitable, either, if that matters. Niche.