Would you be surprised to find out that some parents decide on their high school students' electives for them?
This was before knowledge of comp sci salaries have gone mainstream (before 2012), although it's still a relevant, anecdotal reflection on the backgrounds of current software engineers.
My AP comp sci class was actually composed of non-high achieving people. AP comp sci was the only AP class many of the students took. The high achieving students didn't take AP comp sci for whatever reason.
I think AP comp sci was actually considered lower status/prestige compared to the sciences Physics/Chem/Bio among the high achieving students.
Maybe they didn't like to take classes filled with spiteful boys with chips on their shoulders? The 'whatever reason' is the important part.