surprise (one) by (doing) (something)
To shock, amaze, or astonish one by doing, possessing, or demonstrating something. I must say, he surprised me by his honesty. I thought for sure he'd try to deny it or weasel his way out of a punishment. The kids surprised me by making me breakfast in bed for my birthday.
surprise someone by something
to astonish someone by doing or being something. You surprised me by your forthrightness. No one was surprised by the way it happened.