Is it bad to take lots of AP exams but not take the class for it?

I am thinking of doing independent study for lots of AP classes. I know it won’t give me the extra grade point but since I have more time now (over the summer as a rising sophomore) compared to my junior year, I wanted to take the AP tests. Also, what if I take the AP exam before I take the class? Can colleges see WHEN you take the exams? What if I get a 5 on the AP Music Theory exam, and then I take the AP Music Theory class the next year, without taking the exam at the end of the year?

Thank you!

Surely you can find something more productive to do with your time than engage in double work. What is the point in taking the AP test if you plan to take the AP class the following year?

I do agree with @skieurope that it does seem a bit pointless to take the AP class AFTER you take the AP exam (seeing as how the entire class is geared towards the exam), but if you really want to, then go for it. Just check the AP credit policies for the schools that you’re looking at to see 1.) what classes they accept and 2.) what scores they require in order to give you credit so that you’re not completely wasting your time.