Consider the difference between these simple 4-4 joseki.
Alternatively White can play this way. Black has some kikashi to play (f, and the better g). But no invasion. On the other hand the exchange of and means White has no chance to invade the corner.
There is no right and wrong here. The point about the second way to play is that it accords with framework theory: assuming Black's left-side framework is big (part of an omoyo plan), White's secure group limiting it will be useful, and the more so the more intense the fighting becomes. It is easy to overestimate the value to Black of the kikashi here: they are in the correct direction of play for building up in the centre, but central territory can create illusions about its size (Corner is gold, Edge is silver, center is grass).
If White's intention is to strive for the focal plays such as c, then it makes more sense to play the first way.