In the past, YouTube URLs were created by selecting a username, which was claimed on a first-come, first-served basis. Once a username was taken by a channel, it could never be used again, even if the original channel was inactive or deleted. This system resulted in many channels not being able to have the URL that they wanted and deserved.
Custom URLs are based on channel description, Google identity, associated website and a few other factors. This is to ensure that channels can get a URL that is unique to the channel's brand, consistent on YouTube and shared across all of Google's services.