The strong player plays straight, the weak plays diagonal

ba
Straight versus diagonal

Black's stones are weak compared to White's stones, even though both players have invested two stones each. White can aim at a later for expansion. Black also has nasty aji at b.

roka: See DiagonalAttachmentFollowUp and DiagonalAttachmentAsInferiorShape for more insight as to why this particular exchange can be advantageous for White.

See also