The reasoning behind this effectiveness is relatively simple. When people are surprised, patterns are broken. "Humans adapt incredibly quickly to consistent patterns. Consistent sensory stimulation makes us tune out." There might even be a biological (or evolutionary) basis behind why surprising things and pattern-breakers grab our attention. When there is something new or unexpected in our environment, we are jolted into action and our attention is focused. Our goal at this point is to understand why we were surprised and as a result, we start paying attention. By paying attention and thinking about what surprised us, we are much more likely to commit ideas into our long-term memories. We are now more invested in the problem than before and are actively seeking to solve it instead of being passive participants.
However, the only goal isn't to simply go for surprise. The surprise or unexpectedness must be followed by the insight that you are trying to get at. I know that this is getting redundant but I enjoy examples using environmental behavior so I am going to continue with that theme. For instance, if your goal is to urge people to conserve water, you could first surprise them with an unexpected statistic and then once you have their attention, you can continue on with your insight on why they should be saving water. You could craft a message such as: "Each additional minute of showering could provide enough drinking water for 10 people for a whole day. Think twice about how long your showers need to be." In this example, the surprising statistic is supposed to be how much water is used up every minute and the insight is to urge people to conserve.
A personal favorite example of mine deals with grass lawns. Apparently, lawns were used by royalty in 17th Century England to display wealth. "Only the rich could afford to hire the many hands needed to scythe and weed the grass, so a lawn was a mark of wealth and status." Additionally, a lawn was used to show that the individual (or family) was rich enough to essentially waste agricultural land for non-agricultural purposes. After I heard about this surprising origin of lawns, the information stuck in my head and it made me even more likely to support native vegetation and gardens instead of grass lawns.
A little bit'o surprise can go a loooooooooooong way in making your ideas memorable...