It's just the expression. No explanation other than that.
"To be in for a surprise"
It just means "will be surprised"
He's in for a surprise. = You know something he doesn't. Therefore, he's going to be surprised when something goes wrong/unexpected happens