There's a diference between not having a brain (being stupid) and going crazy. In many stories, villans are mad and crazy while also being very inteligent.
I just don't find Discord's joke funny because it is refering to Twilight being stupid, not Twilight being crazy.