Because
they could (Technology)

It
wasn't just machine guns scything down advancing infantry by the fistfull. It
wasn't just airplanes delivering death hundreds of miles behind enemy lines. It
was trucks and railroads that could provision huge armies in desolate
battlezones. Tanks brought movement back to armies that had stalled in front of
unbreakable fortifications. Radar and sonar could locate enemies far beyond
the line of sight. Radio could coordinate offensives across an entire
continent. Industrialization produced vast quantities of munitions that could
be expended in great wasteful overkill. Urbanization brought huge populations
together where they could be pounded by air raids or rounded up for massacre or
deportation. Well-staffed and well-wired bureacracies made it nearly impossible
to hide from the tax collector, the draft board or the secret police.

Because
they wanted to (Ideology)

At
first I was hoping to be clever and connect the major upheavals of the 20th
Century ideologically:

Unfortunately,
this analysis fails on two points. Firstly, National Socialism was "socialist"
in much the same way that the Democratic Republic of (North) Korea is a "democratic
republic". The Nazis called themselves "Socialists" because it
attracted more working class support than calling themselves the "We'll
Stomp Anyone Who Gets in Our Way Party", but they hated real socialists
and supported none of the economic redistribution that is the core of authentic
socialism.

Secondly,
we can't blame the First World War entirely on Nationalism. In fact, it's hard
to blame the First World War on anything in particular because we're still not
sure what it was all about; however, the Great War was such a catastrophic
trauma for Western Civilization that it caused a massive ideological
reassessment across Europe. Among the winning countries, this showed up as
post-war hedonism and artistic nihilism, but among the losing countries, the
rejection of mainstream philosophy was more thorough. Russia turned Left,
toward the hyper-modernism of Marxism, while Germany turned Right, toward the
hyper-primitive Nazism. Both philosophies brutally dehumanized and demonized
the opposition, and casually threw away the lives of their followers in the
name of a greater good.

Because
everyone else was doing it (The escalating cycle of violence)

Each
killing created a litter of bitter orphans who would grow up to avenge their
father's death. Each campaign pushed thousands of refugees into a life of
scavenging and plundering. Each draft put more weapons into the hands of
thousands of angry, alienated young men who were just as likely to use them
against their own government as against the enemy. Every conquered nation had
to be liberated. Every surprise attack brought another country into the war.
Every loss had to be reversed. No victory was ever final.

It
was only after the development of nuclear weapons that
the cycle of violence ran into a brick wall and was forced to stop.

Average:
During this period throughout the world, wars, genocide and oppression killed
approximately 42,000 out of every 1,000,000 people (4.2% of the world).