It's interesting how we're iffy about surprises in our everyday life, but we do love it in our entertainment. There's something about the unexpected that is alluring. I've often said that I'm sure there's a part of our brain lights up when something exciting or stunning happens to our favorite character (in books or television) that we never saw coming. That's entertainment.
When I'm writing a book, I tend to be very conscious of when the story starts to take a low point. It doesn't mean it's terrible to do so, but I don't like to have things go an even course for too long. My rule is if I'm feeling a little bored, so is my reader, and therefore, it's time to shake things up.
Shocks can come in many forms. It could be as simple as a character's comment or reaction to a situation or something more alarming, like violence, an impromptu sex scene, an argument, unexpected news, sudden death, illness, or when surprising characters show up. Of course, there are many other options, but the main idea is to add something that readers didn't see coming, and ideally, neither do you, as the writer.
Shocking twists keep the story alive. Readers want to be entertained, so entertain them.