The honest answer that applies to almost everyone here is that as a kid, they liked playing computer games and heard that the job pays well.
It's interesting, because to become a plumber, you pretty much need a plumber parent or a friend to get you interested in the trade show you the ropes. Meanwhile, software engineering is closer to the universal childhood dream of "I want to become an astronaut" or "I want to be a pop star", except more attainable. It's very commoditized by now, so if you're looking for that old-school hacker ethos, you're gonna be disappointed.
I think you're grossly underestimating the number of people here who fell into software development because it's one of the best outlets for "the knack" in existence. Sure, this site is split between the "tech-bro entrepreneur"-types and developers, and there are plenty of developers who got into this for the cash, but in my experience about a quarter of developers (so maybe 10-15% of users on this site) got into this profession due to getting into programming because it fed an innate need to tinker, and then after they spent a ton of time on it discovered that it was the best way to pay the bills available to them.
I got stupidly lucky that one of my hobbies as an avid indoorsman was not only valued by the private sector but also happened to pay well. This career was literally the only thing that saved me from a life of poverty.
It's interesting, because to become a plumber, you pretty much need a plumber parent or a friend to get you interested in the trade show you the ropes. Meanwhile, software engineering is closer to the universal childhood dream of "I want to become an astronaut" or "I want to be a pop star", except more attainable. It's very commoditized by now, so if you're looking for that old-school hacker ethos, you're gonna be disappointed.