There are many different reasons for the high death toll in the war. One is simply the populations involved. If two small neolithic villages with populations of 300 each fought, the absolute death toll would be a maximum of 600 (a very high relative death toll would be possible but that is a different issue).The population growth of the US provided large armies.
Next, both sides were sufficiently evenly matched to keep the war going for several years.
Next, military technology had improved significantly since the great religious wars of Europe, thus causing a greater number of deaths.
Logistical support was weak at times, resulting in starvation for some of the troops.
Breakdown of prisoner exchanges led to deaths in prison camps.
Finally, medical technology, especially at the beginning of the war was relatively crude. Actually more soldiers died of disease and infection than died directly on the battlefield.
Eventually, though, what is responsible for death tolls is that people are willing to keep on killing each other. If two sides are committed to negotiating, war is averted. If both sides are willing to kill people, then people die. If military and political leaders are not committed to minimizing loss of lives (on all side), people die.