They don't. This is more of a pious tradition, rather than a papal obligation.
Why new popes change their name
There are a couple of theories as to why newly-elected popes choose a new name but, in my opinion, the most likely is that much of the early Church was made up of converts from paganism.
As such, they would have been given pagan names at birth - which they would have to drop once they were elected pope.
One example of this would be Pope John II, who was originally known as Mercurius (after the Roman God Mercury) but changed his name at the beginning of his reign in 533 AD.
However, the tradition was only really became common practice following Pope Sergius IV (in 1009 AD).
Misconceptions
Another theory that I've read about is that popes choose a new name in honor of Jesus's renaming of the apostle Simon.
When Jesus decided to make Simon the head of his new Church (effectively, the first pope) he described him as Cephas: the Syriac or Aramaic word for "rock" - which is where the name Peter comes from.
Interestingly, Peter (or its equivalents) were never used as names until this renaming of Simon - which suggests to me that the use of the word 'Peter' was more symbolic of the role Simon was to play, rather than an actual renaming.
One final theory
Another motive for new popes to change their name is Biblical tradition. In the Bible, a name-change is often associated with a new mission being assigned to someone.
This is the case when God changes Abram's name to Abraham, and there are a handful of other examples (Jacob to Israel is another one).
Whilst this may be an additional pious incentive, I very much doubt it was the main reason this tradition arose.