There are only two legitimate reasons to program: for money or for God. Atheists can replace "programming for God" with "programming for the craft". God simply reflects goodness. Programming for God means to program just for the sake of creating something good, something that is figuratively pleasing to God.
The other common reason to program is for people. You may program to contribute to some open source community or to make something useful for people. Don't do this. People are horrible evil stupid vile scum. You would be better off programming for cockroaches. People hate what is good and love what is bad, so if your code actually pleases them then you know that it is horrible code. If you write good code, people will hate it. So if you are motivated by people, your code will be horrible. This is why you must program for God, not for people.
Programming for money doesn't have these issues because your code will be private and the human scum will only use your program, not actually see the source or know how it was written. So this code is protected from evil human influence. Such code will tend to be practical, not beautiful like code written for God. But that is good enough, and the purpose of such code is only for money.
I thought about these issues in the context of my Luan project. I am almost done making the hosting code open source and I was thinking about what to do next. The options are: fork Lucene and save it from modern scum, develop a Reddit alternative, or add a GUI API to Luan and use it to write a text editor. The Reddit alternative would obviously be most useful to people, but as I said one should never program for people who are just scum. So that option is out. Forking Lucene would be the most practical choice since my business code heavily depends on Lucene. But Lucene is a separate project from Luan and so the Luan code itself wouldn't benefit from this. A Luan GUI API and text editor is useless for people and has no practical benefit. But it would benefit Luan itself, and Luan is my offering to God, so clearly this is the right choice. This is what I will work on next on weekends.