Why are AP scores so undervalued?

Mainly because AP courses and tests are not universally offered to or taken by college-bound high school students, and those who do take AP courses and tests may not necessarily take the same ones.

However, if it is true that A students in your high school’s AP course tend to get low scores on the associated AP test, there is probably some inadequacy in how your high school teaches that AP course.