It takes a long time for widespread adoption of a programming language in schools. 15-20 years ago you likely would have seen some mix of Pascal and C++. Pascal came into popularity as it was pushed expressly as a teaching language. For learning basic principles of computer programming, it was fair enough, but its fan base dwindled over time, and never was a great candidate to use outside of the classroom.
C++ was (and is) broadly used in real applications, but is also a mess for beginners to learn.
Java was a reasonably decent choice to move to: it was more beginner-friendly than C++, and, thanks to most excellent marketing from Sun Microsystems, it quickly became entrenched in numerous corporations as a replacement for COBOL and for building web applications, making it useful to learn for programming outside of class.
Looking back on the late 1990s, the Java bandwagon was intense. It was being pushed all over the place, by people both in industry and academia. It was definitely an improvement for many programmers; depending on what kind of software you were writing, Java could have been a huge benefit over C or C++. Much of its praise was well-deserved, but I don't think I've seen a programming platform pushed so hard and so loud since then.
What's in the AP classes today is a direct result of the Java fanfare of ~15 years ago. It will almost certainly change again, but in the meantime, despite numerous criticisms online (many of which are probably true), it's not a bad language. It's just not particularly interesting, and is sometimes annoying, for many people who have come to favor programming in other languages.