It's because there are a significant number of us for who tinkering with and building shit is basically a compulsion. And software development is
vastly more available, and quicker to iterate and thus more satisfying, than any other tinkering discipline. It's probably related to whatever drives some people to make art, the only difference being that the market has decided that the tinkers are worth a hell of a lot more.
For evidence towards the compulsion argument, look at the existence of FOSS software. Or videogame modding. Or all the other freely available software in existence. None of that is made by people who made the rational decision of "software development is a lucrative field that will pay me a comfortable salary, thus I should study software development". It's all made by people for whom there is no alternative but to build.