Stupidity is a genetic tendancy to try anything, it is most common in males ( 28%). In pre-history it increased the survival fitness of the group if a minority of males were oblivious to danger. Many of the dangers of the pre-historic world could not have been dealt with by sensible females, sensible females also stumble onto fewer discoveries or inventions (good or bad).
The gene for stupidity survives because it benefits the group, while the individual with it usually dies early, the gene is passed on.
Humanity is presently the dominant species on earth solely because we are the most stupid species, not because we are the most sensible, it is a strategy that only offers short term victory, as we randomly destroy the planet we will wipe ourselves out in an evolutionarily short time span.
Einstein, universally celebrated as a genius, yet a genius can still be stupid, he was responisible for the greatest stupidity in history, the Atomic Bomb.