The fundamental problem is that human invented ideology is not divine. It's at best an imperfect approximation of the divine plan for life and something that only has value because the approximation is fairly easy to understand and promotes a closer following of God's plan. What God wants is both hard to understand and difficult to follow through on (due to our fallen nature).
When ideology varies from what God wants, inevitably bad consequences ensue and human beings who have bought into the ideology have two choices:
1. go back to the drawing board to tweak the ideology to a better approximation of what it should be.
2. kill people until the critique of the ideology stops.
Both communism and naziism choose option 2 which both serves to lessen criticism and to distract people into a worrying about the details of the killing and how they can personally avoid the human meat grinder that the state has turned into instead of the normal business of politics. The reason that these two ideologies inevitably choose option 2 is that they are such fundamental failures at basic features of a political ideology that if the people were to go through the introspection necessary to go back to the drawing board and tweak, they would be tremendously outraged and tar and feathers would be the best that the nazis/communists could hope for. So in order to avoid a beating at best, or more likely a hanging party, they start killing others early and often.
This isn't to say that the choice is only done by communism and nazism. Every spectacularly failed ideology has killing as an option to giving up the political battle. It's why the procedural safeguards for peacefully transferring power after free elections are so important. They preclude option 2 and the body count that goes with it.