When you bite into a chili pepper, or food laced with chili pepper, the brain registers "noxious heat*," interpreted as dangerous. When the brain through repeated exposure to chili, learns that there is no danger, the experience looses the unpleasant associations but retains the excitement, or "zest," as it is often referred to by food writers.
Violence, like sex, gets our attention. This has survival value. It also means that when we understand that that violence, as in a video game, is non-threatening, or threatening only to our avatar, but not to our physical self, then we enjoy the thrill of the violence vicariously. The experience looses any negative associations (in our brains) and retains the excitement and stress producing elements that make for engaging game play.