Is the decrease in number of developers due to real scarcity or due to fewer people that actively using Stack Overflow?
Most people get into their career in their twenties. For computers it's often even younger. But it seems relatively rare for someone to pick up programming in their 30s or older.
If you're 40+ today, your twenties were ending around the time that the "tech boom" was beginning. But there just wasn't as much information and inspiration around for getting into software development. Even through the mid-90s a college degree and programming skills was no sure ticket to cushy employment.