People like Putin and Trump play dirty because they think that's what you have to do to win
A president has to inspire unity for the country and most dictators suppress and hide the fact that they don’t even have half the country supporting them using different tactics from rigging elections to squashing the opposition.
Hitler rose to power from the virulent fear of communism combined with the chaos and ineptness of the Weimar republic. Trump has risen to power because of the latent racism in the United States combined with the incompetence of the two political parties in the US and the fallout from the 2008 crisis. Among other things.
Playing dirty only happens when there's nobody there to stop you. This we all know from the elementary school playground.