White 2 here is interesting, because White is willing to accept a farmer's hat shape.
This is a joseki continuation. After playing 6, White could turn and attack on the upper side. So Black has to consider carefully before defending on the left.
You could say that in this variation White successfully prevents Black from developing on both sides.