TL;DR summary: gore and your examples thereof belong to even broader classes of stimuli that activate a number of different aversion and defense systems. To some extent, no one really knows why, and some of the most appealing answers may come from somewhat unfalsifiable theories.
Building on @caseyr547's answer, disgust occurs somewhat automatically when viewing blood, injury, and vomit. The basic, somewhat unconscious judgment being made here is essentially, "There but for the grace of God go I," and both the mind and body activate what defenses they have against going there, including the behavioral inhibition system (BIS), according to Jeff Gray's theory. My point in mentioning that theory isn't to focus on it; I'm mainly trying to point out that there are very large and pervasive changes in physiological and psychological function in reaction to disgusting or otherwise threatening stimuli, including the BIS, the sympathetic nervous system, the immune system, and some largely cognitive processes like attitudes (these aren't completely distinct from one another necessarily).
Why? Here's a pseudo-evolutionary argument: prehistorically speaking, when have we most often encountered these stimuli? When something very dangerous was about! Nausea and fainting might not protect us directly from physical attack, but it certainly discourages us from cutting ourselves (or others) open...and we've always been a danger to ourselves in that regard. As for blood and vomit, they may transmit biohazards of all sorts. Purging our own contents is one way to make sure we're free of any similar biohazards, which we might've ingested too if we happen to see our friends or family suffering from food poisoning, for instance. Short of that, simply experiencing these aversive reactions is a strong motivator to avoid the causal stimuli entirely, which is also a good way to play it safe when the root threat might be something like toxic gas or airborne (or otherwise communicable) biological pathogens. One shouldn't underestimate the extent to which we may have generalized these semi-instinctual reactions unintentionally (as through evolutionary mechanisms) to control our conscious behaviors unconsciously! From an "intelligent design" perspective, wouldn't it make sense to program ourselves to break down and feel awful involuntarily when exposed to dangers like these, so long as it helps ensure that we choose to get the hell away from them?
These are just thoughts ("theories," maybe) about why, FWIW, and they're somewhat unfalsifiable. As @BenCole pointed out, a more biopsychological account of how we react and to what might be more useful, if anyone else can help flesh out that side of this discussion. However, this would answer a slightly different question than why. One can explore and thereby better understand the broader class of stimuli that activate the aversive reaction systems in question, and thereby better understand how these particular stimuli belong to that broader class...but to some extent, we may never truly know why our systems are semi-instinctually sensitive to these stimuli...and an argument that they are simply generalizations of the broader class of stimuli to which the systems inherently respond is still a non-answer as to why the systems respond to them.
As for the partly non-instinctual, developmental processes of sensitization and habituation, caseyr547 is right again to say that these learning processes operate very broadly. They are deep subjects deserving of their own questions, if you have others. Somehow, habituation even has its own Wikipedia page apart from the one caseyr547 linked! I would've understood desensitization and habituation as synonymous, but that too implies a separate question. My point is that these are known phenomena (or a known phenomenon) with a deep pool of research and theoretical literature that mostly explains itself. If you look further into it, I think you'll see that it's a rather small wonder to observe that it operates on the disgust reaction as well.
To once again offer an unfalsifiable, speculative, evolutionary perspective on why that might be, consider that some of us may choose or be otherwise predisposed to expose ourselves to these dangers more often than others, and may even profit by doing so. If you saw a profit in exposing yourself to danger of injury or infection, wouldn't you want to be able to develop a stomach for it? Prehistorically speaking, when there has been enough of a profit in overcoming instinctual aversions to justify doing so, maybe doing so has improved the selective fitness of those whose instincts are weaker, and the fitness of those who are better able to habituate to stimuli and attenuate instinctive reactions that are circumstantially, pragmatically counterproductive. Who knows? It would make enough sense if it were true, anyway.