OP, one thing that also can come into play with trades is a (potentially) significant reduction in sales tax.
For instance, years back I traded my Acura in toward an Explorer. I received $7000 in trade-in value, but I had already worked the dealer down to actual cost plus $500 on the sale (since I knew via edmunds.com that he was getting another $750 in factory incentive money for the sale; it was the end of the month; it was a rainy Sunday...).
In theory, I could have sold the car for $8500 to $9000.
That would have required advertising costs, some delays, and letting people test drive the car - which could induce risks ranging from attracting some psycho, to just getting a bad driver who damages the car during the test drive.
But, to top it off, sales tax in that area at that time was about 9%. Sales Tax is paid on net purchase price. My (then) $25,000 SUV was actually being sold to me for $18,000 - so I was making $630 in net tax not required.
Suddenly, my $7630 isn't too far from the lower end $8500, and I haven't had to advertise, haven't had to wait, haven't had to run any risks whatever.
Now, translate the concept into gun purchases and trade-ins, vs listing and selling one's own then buying, and it's similar.
Then again, I have been relatively successful selling guns I no longer want on gunbroker, so odds are I'd just sell another gun or two, then pay the lower cash price.