>>13744893
>Why do they do this
It's a psychological tactic that encourages the player to play better. It's the developer going, "We're giving you X amount of tries to see how well you can complete these series of challenges. If you fail, it means that you're not as acquainted with our game as you think you are. Go back and practice until you can get here without making as many mistakes."
Arcades banked on the idea that players wanted to git gud, so they offered a series of challenges and they'd get paid relative to the buying power and motivation of each player. Most devs didn't make an impossibly difficult game, just one that requires foreknowledge and effort to complete. Consoles just took this tradition and removed the monetary penalty.
>but what about the fact that your lives are technically infinite?
Yeah, you can play as long as you want, but the lives system is just a simple mechanism that will punish players for poor performance. You die, you lose progress.
You're basically asking, "What's the importance of having enemies that deal damage? I 'technically' have an infinite health bar when you think about it, so aren't health bars moot'? Yeah, your health bar is technically infinite, in the sense that when you die it will be restored to full, but enemies exist to deal damage, and the whole point of the game is to use your abilities to kill enemies and traverse the course, and perhaps participate in a boss battle.