It works here on multiple levels, because first, owning the insult is not expected, so that's already a surprise, which can work as a joke.
Then, by actually admitting to the many bad classes, it signals that the author can actually tell good from bad, implying knowledge about the matter after all, refuting the argument in the insult (that he is bad in philosophy because he had bad philosophy classes).
Third, it's a very short, snappy response, in vein of the insult, making the author look competent.
Second guy says he's had a bad philosophy class, implying it's a bad, naive, amateur, or uninformed take on the philosophical subject at hand.
First guy says he's had many, implying he's actually studied philosophy extensively, perhaps majored in it in college or obtained a degree, refuting the idea that the original take was amateur or uninformed.
Then, as a non English native speaker, I thought it was a word play ("you have had a bad Phil o Sophie ass" + "I had too many" or something).
Then, reading the responses to your comment, found it was the witty canned response I originally thought all along...
I could never explain to NFT fanatics that I wouldn't make NFT art because I couldn't stand producing a product for people who had no taste and would like my worst output as much as my best.