Grammatical pattern: it + VERB + somebody + when + CLAUSE
The verbs in the list below follow this pattern.
amaze, anger, annoy, bother, bug, concern, confuse, delight, distress, disturb, embarrass, frustrate, irk, irritate, perplex, please, puzzle, scare, shock, stun, surprise, terrify, vex
See also the full discussion of the pattern it + VERB + somebody + when + CLAUSE.