That works best, for surprise, if you don't have gunpowder in the world.
Because, of course, we want it to be surprising, but inevitable. Usually. Sometimes we want to see the story unfolding like an inevitable opening of an elegant and simple tulip. Which is why even though I think Tangled the best of the Disney fairy tales, and an all-around great story, I do not like the scene where Flynn's voice-over is explaining Rapunzel's origin, because I am groaning that it's not Rapunzel. (Mind you, the rest of the flick isn't Rapunzel, either, but the opening for some reason brings it on.)
Though not all retellings work smoothly. I don't know what it is, but in two Thief of Bagdad movies, I saw a story coming. One was The Fisherman and the Genie and I groaned as soon as I recognized it. The other was the tale of the three princes saving the princess only because they have, between them, a magic carpet, a magic spyglass that can see over a day's journey away, and a magical apple with healing powers. And when the characters, for a moment, seem to be going on without looking for the princess and so triggering the tale, I was on the edge of my seat, wondering whether they were really going to let it go. When one turned back to suggest it, I was delighted. Go figure.
But even when not elegantly retelling a fairy tale, stories make promises, and we want to see what we expect to happen. A tragic or even bittersweet ending is not so much a problem if the opening didn't implicitly promise happily-ever-after.