If Black ignores White's marked move, White can make a tiger shape. This is considered very advantageous (when the Black stone is isolated as in this diagram). Therefore, ...
, preventing the tiger shape, turns the white move into a shape that isn't by itself ideal (see diagonal attachment - as inferior shape).
Often White plays hane like this, especially close to edge.
Under comparable circumstances, when eyeshape is at stake, one sees Black hane like this.
If the diagonal move is deliberately played, and not a weak player's diagonal it may have been with the purpose of making Black heavy. Black may then dodge White's intentions and jump lightly to .
Charles here is a recognised sabaki technique, when Black would otherwise become heavy here. Black accepts that White can cut now. See diagonal attachment knight's move angle play sabaki technique.