But in the example above, "What the hell?" expresses the idea of "Hey, why not?" You say this when you're going to try something, even though you know that you shouldn't or you don't really expect to get great results. Even so, you're going to try it anyway. For example, you can say "What the hell...":
- when you buy a lottery ticket
- when you take a dessert even though you're supposed to be dieting
- when you try out some exotic food that you've never had before, and that looks a little scary
When you use "What the hell?" in this way, the stress is on the word "what".