Warranty and the assurance that wear and tear is effectively zero, compared to a used gun, for which it may be difficult to judge the condition and value, especially when it's your first handgun. And in most cases you can know how long it will take to get a new one from a retailer, instead of waiting an unpredictable length of time, maybe only a few days but maybe a few years, for someone to offer for sale used the particular gun that you want.
But buying used should be cheaper - often it is much cheaper and well made guns can last a long, long time and be great value at used prices.