At a very basic level, being good means exercising self-control. Ignoring your base "I want" because you realize the potential consequences and don't think they are worth the cost.That cost might be direct punishment, or merely ethical, i.e. the cost of living in a world where bad things happen.
You see a pretty woman and want to have sex with her. But you don't knock her out and rape her because you recognize that it is bad and don't want to live in a world where that happens. Or if you are a little bit less philosophical, don't want to risk going to jail for your crime.
Now people with power, particularly politicians, tend to have ways to get out of punishments. As such, the philosophical reasons tend to become more important. The more power you have, the less fear you have of punishment and the more important the philosophical issues become - as if you have such power you recognize that your actions have a much greater affect on the world.
But the stupider you are, the less likely you are to care about the philosophical issues, no matter how important they are.
The fact that in the modern world we have so many ethical rulers is actually fairly surprising. So many people recognize, either consiciously or unconcisouly the importance of their actions.
That also means we should not trust the unethical rulers, even if they are good at what they do. Drug using mayors, child raping Italian leaders, etc. all fail to either recognize the affect their particular actions have on others around them, or fail to care.