Pitch (someone) a curve (ball)

To surprise someone with an unexpected act or event.

The lawyer pitched the woman a curve when he began to ask questions unrelated to the court case.