Never. I usually agonize over it more than is probably justified. Some of the reasons are:
The difficulty of buying used guns in my area. Shops don't seem to be willing to carry an inventory, perhaps because they get undercut on price. The one traveling gun show that comes around always brings total junk. I'd say no more than 1% of the stock carried by vendors there are quality guns and they consistently ask above retail prices for those. There is no loophole for FFL's and they're all required to do background checks, so there's no loophole premium. I would be more inclined to impulse-buy used guns if I thought that I could buy them at a depreciated price and resell them for close to what I paid.
The difficulty and expense of selling used guns in my area. There are actually a lot of buyers, but they are not interested unless the price close to 50% of retail. There are a few brand-names they'll pay more for, but no matter what, resale is only at severely depreciated prices. Private party transfers require an FFL, so there is no private-party incentive.
Those two points might seem contradictory. What I'm saying is I can't buy used guns at low cost, and I can't sell them at high price either. The market seems to screw me coming and going.
The difficulty of renting. The nearest rental range is 50 miles away. It's pricey. They nickel-and-dime you on everything. Their inventory is mostly polymer handguns and tactical long guns. If you're interested in something different, purchase is the only practical way. This reduces impulse buying because an impulse buy would be easier if I had shot a similar gun before. Maybe that's less impulsive, but it is at least more conducive to the buying part. FWIW, I've rented six guns there and didn't go on to buy any of them. I do have a much better idea about those guns than I did before I rented them, and might consider buying two of them, perhaps on an impulse someday.
Another reason is the guns I do buy are all costly. I tend to buy guns around the $900+ range, but I add optics and mounts to both handguns and rifles for $600 to $1200 more, and then I buy all the reloading dies and enough powder, primers, and bullets supply 1500 (rifle) to 20,000 (handgun) rounds and at least a tenth that much brass. Even if I'm already geared up for a cartridge, a new gun is almost always a $1500 or more proposition for me. Long guns could start higher and their optics are real budget busters. Handguns can come with expenses for holsters and magazines or clips.
I'm disinclined to purchase a gun unless I'm prepared to become proficient with it. For me, that means more than just ample practice sessions. It means training. I could add this to all the other expenses I just mentioned, but more importantly, it takes some amount of my limited time. So when I factor in the big initial expense, the big loss on resale, and the limited time I have to dedicate toward a new gun, it has to offer a very compelling value proposition for such an exchange.