Hmm. I'm a developer now because I had a brain-numbing government employee job - I had developed an interest in programming as a young child, but it never went anywhere, and I'd largely forgotten about it.
Fast forward, I'm stuck in an underpaid overworked dead-end job which I'm resigned to because I have a wife and child to support, and I'm borrrrred. I then stumble across a website discussing how fun and accessible Python can be for newbies, and I give it a crack, and I'm hooked.
I get a new government job, better pay, less work, still boring. But the boredom at work gives me a huge amount of mental capacity for my learning at home. My sleep admittedly suffered because of my programming, but my work didn't. In my downtime at work, I'd write programs. I spent a lot of time learning JS because it was available to me for hacking on in my locked down work environment.
After five years of government schlepping by day, and programming by night, I met a man who could overlook my lack of qualification and who would give me a chance to prove myself. And all that boredom finally paid off.
Now that I'm a developer, my work is so intellectually challenging and interesting that I could not replicate the same learning that I did in my duller days. I just don't have enough mental capacity left at the end of the day, these days.
In summary - my boring day job gave me the capacity and impetus to learn to code.