Desktop computers were released in the 1980s(Apple II, MS-DOS). If you think about it, that's only 40 years at most where the gates of software programming has been opened.
Considering that everyone in the 1st world country has access to a computer, and given that much of our lives are entangled by software, it's just a demand problem. The demand for software completely outstrips the number of software engineers available. Given people's short attention spans, and the incredible number of concentration and patience the discipline requires, I expect the shortage to continue for the foreseeable future.