70 years ago, on 20 July 1944, the attempt of a group of putschists around Graf Stauffenberg attempted a military coup to gain power over Nazi Germany, involving the assassination of its leader Adolf Hitler. The failure of this plan inspires one of the most famous “What if?” questions in history.
History is full of decisive moments in which tiny details are of crucial importance. It is thus very tempting to ask questions like:
What if Stauffenberg’s bomb had been placed a little closer to Hitler?
What if Gavrilo Princip missed Archduke Ferdinand in 1914?
What if there had not been a rigging of the US presidential election in Florida in 2000?
As these examples show, what first come to mind are questions about how history may have taken a more positive course, if the fate of this or that influential person had had been differently. Some historians refuse to address these types of questions at all and they have a point. There is a finite (albeit very large) number of events which have taken place, but an infinite number of events which could have happened. What would be the academic point in fantasizing about stuff?
However, by definition we can only describe an event as being important, if an absence of this event would have resulted in history taking a different direction. Every judgement of an event automatically includes the hypothesizing of this event not happening.
As said above, “What if” questions focus on actions of a very small group of people (often only one person) and a very restricted time period (mostly seconds). The question whether we regard counterfactual history as mere entertainment or if we attach scientific relevance boils down to the general perception of history. Can singular persons exert a real influence on world history or not?
Until the 19th century, historians solely focused on the actions of “Big Men” and how they affected the course of their societies. This limited approach to history was contradicted during the industrialization by theorists who went to the opposite extreme. Marx for example claimed that history takes a destined course and is only influenced by masses of people and major shifts of economic structures. 
The example of the 20 July 1944 shows that, as so often in social sciences, the answer lies somewhere in the middle. The putschists were Nazis themselves and their motivation did not lie in a rebellion against the national socialism, but against Hitler’s conduct of war. A successful coup may have resulted in an accelerated break down of the Third Reich due to the disappearance of the uniting figure of the Führer. This would have saved the lives of millions (civilians, forced labourers, Jews, etc.) in the subsequent 10 months of the war.
However, the new military leadership around Stauffenberg might have even defended the German control over Europe more effectively than Hitler actually did. A prolonging of the war even beyond May 1945 might have resulted in the Enola Gay taking course on Hamburg and not on Hiroshima.
If you are interested in the fascinating literature of counterfactual history here are two literature recommendations. By nature, the genre is closely related to science fiction and utopian/dystopian novels.
Robert Harris: Fatherland
(Plot: In 1964, many years after Hitler won the war, a German investigator finds out the truth about the biggest state secret: the Holocaust.)
Kim Stanley Robinson: The Years of Rice and Salt
(Plot: In the 14th century, the Black Death kills 99 % (instead of actual roughly 30%) of the European population. The continent gets populated by Muslims, while native Americans and Indians join together to spread democracy.
Image source: http://skepticism-images.s3-website-us-east-1.amazonaws.com/images/jreviews/Hitler-Assassination-Attempt-1939.jpg