The effective range of the F-22's Vulcan Cannon is 2000 feet - That's where you expect about a quarter of the shots to hit... When you're talking about a fighter-jet sized target. The bullets will easily travel, still at kill velocity, well beyond that. I have no doubts that for a slow moving target such as a balloon, they can spray and pray, and pop it every time.
You might be right. On the other hand, today they used a missile. Such a missile costs about $200k, while a Vulcan round is under $20 (collectors can buy one round for $20, see [1], the military can probably buy in bulk for much less).
Maybe they just wanted to show off. But maybe it's just not that easy to take down a high flying balloon with unguided munitions.