I think most of this is due to the simple fact that software development has been a steadily growing profession for decades. Thus, the "population pyramid" of software engineers will very much be a pyramid and older developers will be proportionally scarce. If you want to make meaningful predictions about your personal likelihood of staying in software development beyond a certain age, you'd need to slice the numbers differently.
I believe that once the number of software engineers stabilizes, the age distribution will become more similar to other fields. Some will leave the field during their career due to changes of interest or due to life throwing them curveballs. But a lot will stay.
I'm 43, BTW. Still find software development and tech enjoyable.