It's the only thing close to a justifiable reason, honestly. But even then, if you're paid for a full-time job as a developer, and asked to develop a piece of software, you can't very well say "I'm paid enough to develop all the other stuff you want, but not this one thing" with a straight face. You could certainly use your development of it as a good reason for a raise, though!
While there are some truly bad things in the top-level comments, it seems a non-trivial percentage of the responses here are some form of "my employer attempted to make money, sometimes even a profit, in legal ways."
- He asked me privately during a lunch, without telling the people that do the actual work about it.
- I only knew that he intended to fire these people later when started putting the spec of the project.
- He asked me (someone very junior/intern) instead one of his more confirmed devs, which means he didn't want the company to know yet.
- I had a lot of sympathy and even kind of a friendship with those people.
- I wasn't paid enough for it.