Let's first dispel this myth: "all the things that could happen in a dream are made up by us, and should be utterly predictable". This is a common fallacy known as the introspection illusion:
The introspection illusion is a cognitive bias in which people wrongly
think they have direct insight into the origins of their mental
states. ... In certain situations, this illusion leads people to make
confident but false explanations of their own behavior (called "causal
theories") or inaccurate predictions of their future mental states.
This is a common notion in psychology research. So the more interesting question is not why are we surprised by our dreams, so much as why are we not surprised by our non-dreams. But I digress.
Dream imagery is often generated partly from long-term memory rather than external stimuli. Unlike normal perception, which is continuous and generally sensical, dream imagery is disjointed and not sensical. Interestingly however, subjects of dream research report only realizing the bizarre nature of their dreams after they wake - they are not "surprised" by the imagery during the dream:
During most dreams, the person dreaming is not aware that they are
dreaming, no matter how absurd or eccentric the dream is. The reason
for this may be that the prefrontal cortex, the region of the brain
responsible for logic and planning, exhibits decreased activity during
dreams.