@hszakher you're missing the democracy part, though.
The reason Trump is allowed to run for office isn't because of legalities and good intentions but because a lot of voters want to vote for him.
If the public wants to elect a felon, well, they get the government they voted for.