There are many (mini)games which revolve around the player collecting points to buy upgrades (think Cookie Clicker, ROBLOX simulator games, etc.). Most of these games have a mechanic called "rebirth", where the player can trade all of their points and items for bonuses and/or "rebirth" points. In some games, the player will have exclusive items or areas accessible to them when they get enough rebirths. What exactly does this mechanic contribute to a game, and is it necessary in order to make this type of game good?
Like any other scoring mechanic, there's an element of social prestige. It takes some amount of skill to reach the end of the game, and doing it multiple times shows that you have a lot of skill. See also the prestige mechanic in Call of Duty.
Rebirth mechanics also help with replayability - eventually you run out of ways to optimize your production, but that means you can't scratch the "make numbers go up faster" itch anymore. Players could start a new game themselves, but losing that progress goes counter to the primary reward mechanism of the genre.
Mechanics like this won't necessarily make your game good or bad. That's going to come down to whether rebirth serves the purpose of your game or not. If your target audience is fans of incremental games, they may expect that you include such a mechanic, or they may think that it's over-used; that's a market research question.
Expanding on crass_sandwich's point about 'numbers go up', specifically for idle / clicker / merge games, prestige mechanics allow the game creator to provide an extra 'layer of power', above what's already in the game: by making certain boosts/abilities contingent on prestige (or even
n number of prestiges, for yet another 'layer'), you can give the player exponentially more power without requiring infeasible amounts of grind.
Additionally, there's pleasure for the player in revisiting already-experienced content but with vastly-increased abilities - the player may recall "last time I reached Underboss IV, it took me hours, but now I can one-shot it! RAWR!!"
One aspect that I think makes "rebirth" useful, which I think is missed, is in a game with branching quests, skill trees, etc.
Your players could just start a new game, sure - but sending them back to the beginning, nominally with the same character, gives them the chance to go down a different route.
It makes the game longer, makes sure more of the game content gets experienced, and doesn't have the same emotional weight as "start completely from scratch". This is great if you're a game designer - players get more unique playtime out of the same amount of content.
Rebirthing/prestige, often called a "soft reset", is a game mechanism that works like most other genres' unlockable content. However, unlike most other genres, the soft reset is usually built in as part of the game loop. Other genres tend to have common game mechanics for players that meet certain conditions in the game, such as clearing a level, winning a specific fight, or reaching the game's end credits. The content afterwards is a reward for those who want more content after the main adventure is done.
Clicker and idle games use the soft reset as a way to allow the player to explore more content the more they engage with the soft reset mechanism. In a sense, you might say that the soft reset is actually telling a story of some sort. Soft reset milestones are like "levels" in an adventure game; they allow the players to reach initially unobtainable content by allowing them to reset, but with better multipliers, new skills or features, and so on.
Not every game needs this, nor does every player want this. Sometimes, I enjoy a short idle game, like Space Plan. It's short, tells an amusing story, and I think was worth the time I invested in it. On the other hand, I have save files for Clicker Heroes, Idling To Rule The Gods, NGU Idle, Idle Slayer, and more, that go back many years and have been played for hundreds to thousands of hours. They're something fun to go back to, because it seems they're always adding new content.
Games without a soft reset tend to feel shorter and typically have less content. Space Plan, for example, has a runtime of 6-9 hours. It's a nice way to waste a weekend. Games with well-designed soft reset systems might last for hundreds or even thousands of hours. The soft reset should be designed to unlock new multipliers, skills, and other content the longer the player plays. This keeps the content fresh and engaging.
Sometimes, it helps to adjust a polynomial or exponential cost increase
One of the clicker games I played in the past used what was probably initially a fairly reasonable curve of costs, but after playing for a few months, it wasn't difficult to wind up with a cost per action somewhere in the quintillions, and the curves for increase in clicking power didn't scale with the increase in costs, so it wound up in a situation where I could basically click once a day. The person developing the game introduced a reset mechanic where resetting gave you some additional multipliers at the start of the game, which meant that about a day or so of clicking after the reboot got you back to where you were before, but the multiplier, applied to the respective curves, gave you another few months before the curves went out of whack again.
Arguably, they could simply adjust the curves in general, but doing it in the restart mechanic changes the experience less for people starting from the start.
You've gotten some answers already, but I wanted to point out something extra: prestige is a trope of the incremental genre. In the majority of these games its how new features are unlocked, and I would argue its a pretty core mechanic that makes the genre work. Watching numbers go up is fine, but resetting back to the beginning and watching everything go up again but way faster makes for a very satisfying continuation. It makes the player more aware of how much they progressed in the first place. To my mind, its not the same as replayability at all - because the game should be different after prestiging. You should be reaching much higher numbers, and new content, much faster.
For actionable advice, I'd say that your game does not have to include this mechanic, but if you can incorporate it into your game loop elegantly (see Trimps, Antimatter Dimensions, Magic Research, Kittens Game, etc) then it works brilliantly. In my opinion, the mechanic does not work that well in Cookie Clicker for instance because there are times the game slows to the point you want to prestige, but the amount of currency you gain is not enough to unlock any new changes to the game for the next run. This should be avoided (in my opinion).
A "Rebirth" mechanic allows the games to avoid a "Killscreen"
The other answers are relevant from a player's perspective, and a game designer's perspective, but there's another reason for designers to encourage players to go through a "Rebirth" mechanic.
Most games can manage to find ways around this by having an alternate way of ending the game, but some Clicker genre games could still run into the issue of hitting an integer overflow (Or an long integer overflow).
Even with the largest number storage types, it's possible that a machine trying to store additional numbers to eventually run into a "Killscreen" where they run out of memory, or space to run the code, or they trip a glitch trying to display a number. That type of scenario does happen in some older games, especially where there is no "Rebirth/Reset/New Game +" mechanic implemented.
This allows us to have games where that still scratch the "Numbers go up" itch well beyond what would have been naturally viable for their game's setup.
In a rogue-lite type game it allows the developer to force a new player into a narrow upgrade path for their first few runs through the game. This makes the learning curve at the start manageable.
But every time they die they can purchase new upgrades using "meta currency" that increases strategic options for the next set of runs. And if the rate of earning that currency is decently balanced then a player going through the unlock cycle will only get one or two playstyle-changing upgrades at a time.
All this combines into letting the developer keep the "main" game short and simple and make a "failed" run still mean something in terms of forward progress. For example Vampire Survivors has 30 minutes per run through with a dozen stages and 50-odd characters, even playing each character on each stage to completion once will take hundreds of games.
In Cookie Clicker specifically, the developer Orteil has stated there will only be 20 buildings (Version history for 2.052), so the only thing left is to buy more buildings and upgrades, which is relatively slow to make progress even with combos.
What's much more important is the Heavenly Upgrades system, which lets players customize their playstyle much more than the original Grandmapocalypse mechanic, and introduces more decision making on when to ascend versus when to continue building up CpS. The Angel and Demon upgrades are designed for maintaining CpS while the game is closed, the Golden Cookie upgrades are designed for a combo-oriented playstyle, and the Golden Switch and Shimmering Veil upgrades are designed for idling with the game open. In addition, there are cosmetics like Label Printer and Dairy Selection as optional rewards.