The way I read it, the joke is just owning the insult in a good way.
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.
But it is not funny. It is not a joke. It is just not engaging with the implied "you do not know what you talk about here" ... which is entirely valid, but not exactly a joke.
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.
First I thought it was just a simple witty canned response ala Han Solo, and got confused of why we were elevating it to the level of joke that required to be understood by someone intelligent.
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...
There doesn't have to be a joke. If you're rich enough people feel like they have to laugh at your jokes whether or not they are funny. That's the saddest thing about Elon Musk.
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.