A music theory class can open the door to composition for those who haven’t taken any theory, and can enrich the experience of musicians in general. Not everyone can go to conservatory prep. (A family member also has a doctorate and interest began with a high school theory class.)
@DrPrimo is right about schools not giving weight to the AP course and exam. Most schools, whether BA or BM program, have their own theory sequence. You can place out of intro to theory but even for those who place higher, it can be helpful to start with the intro. So yeah, AP music theory won’t gain credit in college or music school in most cases, and many schools will have their own placement tests.
But there is still a lot of value in taking it in high school. For reasons I stated above and also to get a feel for what you might study and whether you really want to. It also shows commitment to music.