There were far more hobbyists than degree holders available during the first dot-com boom, and the post-bust comparative oversupply of programmers only lasted a few years. Meantime, “web development” (HTML/CSS) continued to grow in demand and provided a foot in the door for people without the CS degree. When demand picked up again faster than new graduates were being produced, a lot of them were able to edge into the industry because they’d learned PHP from Wordpress themes and such.
When it became evident how much developers were in demand and could earn, there was a flood of late millennials and zoomers into CS programs, so the percentage of self-taught dropped to nearly zero. For a while when demand for SWEs still exceeded supply, that was augmented by bootcamp grads because getting the entry level job had become the hardest part and a bootcamp was a signal of legitimacy.
Bigger companies without tech DNA are more likely than small companies or tech giants to insist on degrees. When hiring was tight, they might ignore that signal; but right now HMs are overwhelmed with applicants and filtering by degrees is just one way to whittle the field down to a size they can hope to wrangle.
And it’s common for people over 40 to get out of the field for one reason or another — or shift to consulting, typically as “fCTOs” rather than contract developers — so that older self-taught pool is shrinking.