What does the Wand of Wonder mean when it says “as if you had cast” vs. “you cast”?

One of the possible effects of the wand of wonder magic item is (emphasis mine):

You enlarge the target as if you had cast enlarge/reduce. If the target can’t be affected by the spell, or if you didn’t target a creature, you become the target.

There are multiple possible effects for the wand of wonder that use a similar wording. There are also many possible effects for the wand that say instead that "you cast [spell]".

Mechanically, what are the differences between the two wordings (if any)? What exact aspects of the spellcasting process/effects are different between the two?