Democracy isn't really meant to prevent something the majority wants.
If the majority wants a criminal to lead the country they'll elect them, or someone with the same policies, or someone who promises to put the criminal in power. The end result isn't all that different, and the latter two could be worse in some ways.
In a democracy the majority rules, and should they decide to put a lunatic in charge, well, that would be the least of your problems.
Best I've been able to explain it is that it's a country build on hope and dreams, which are not compatible with reality and truth.