I'm of the latter group.
- Hobby project to play with some tech just because you find interesting
- Hobby project to play with some tech that might help your career in the future
- Homework project to learn about the tech you currently use at work
- For-profit project to hopefully earn some extra money
- For-profit project to hopefully earn enough money to allow you to quit your day job (my case now)
- Portfolio-making projects to show at job-interviews as a junior developer (my case a couple of years ago)
All of them seems legit if your decision to do them is personal. But some of them might be prone to abuse by employers
If someone is thinking that way, then they aren't engaging in a hobby, they're engaging in a startup. That's two different things.
I used to fall into this way of thinking before I recognized what a trap it actually is. Now, when I start a hobby project, I intentionally ignore possible monetization of it. If I feel a strong urge to monetize, then I move it out of my recreation time and into my work time.
I often get bogged down with "how do I monetize, market, and maintain this", which just kills my motivation. Just because something isn't marketed and monetized doesn't make it invalid; outside of work coding has brought me numerous benefits:
- Learning new things. Not because I feel like if I don't I'll fall behind, but because I like learning things I don't get to experience at work.
- Expressing yourself. I like being able to execute on my vision without worrying about what my employer wants. Or, if its a game I'm making, using that coding to express an artistic vision.
- Meeting people. You can still talk about your project at meetups or online without trying to "sell" it.