In every hobby there is always a sense of discipline, it's just usually implicit. For myself: composing orchestral scores started off as a fun little "oh this melody would sound neat". Ever since then, there have been times when I need to sit down and do some "real work" to turn that idea into an enjoyable, fulfilling result. Could I have just wrote things when I want to? Of course. But now, after years of composing, I have the skill to make things that sound great when I really just threw it together.
In software engineering, a beginner or even intermediate programmer is going to lose a lot of their initial motivation to build their idea (game, app, website) -- because in finding the skill to execute on their initial side project idea, they realize they need to develop that skill from scratch, which takes work.
I think there's a good balance between investing skills between "basic knowledge" and "career capital". What that balance is varies from person to person, but I also believe that no matter what, even if it's implied, there is always a certain amount of work that needs to be put in.