Does getting tons of levels waste XP?
Regardless of what your current XP levels are, it will only take 1, 2 or 3 levels of experience, depending on which tier your choose.
The requirement however, is that you have at least 30 levels in order to enchant at tier 3. So, the benefit is that you can enchant many many times, for example, if you have 200 levels.
In regard to the math, however, yes, technically it is a "waste". The wiki states that getting from level 39 to level 40 requires almost double what it requires to go from 29 to 30.
That said, not only is experience unlimited, it has several uses - enchanting, using an anvil (renaming, combining and repairing) and repairing equipment and armour with the Mending enchantment.
As for why it was made that way, that's up to the devs - only they can answer that.