I have never knowingly sold a gun that was defective. All the guns I've sold have been in good working order and the only questionable one was a S&W Airweight that apparently had a crack in the frame. Neither I, nor the purchaser knew this at the time of sale, and I never saw the crack afterwards.
All the guns I've sold have been sold because I either didn't like them after shooting them, or I had thoroughly explored the design and decided I wanted to try something else. I have, on occasion, just bought a particular model or style to see how it functions. For example, the AR I had was bought out of curiosity. Once that curiosity was satisfied, if the gun wasn't particularly to my liking, I would often sell it. Good news for the buyer.
I prefer new, but will also buy used. I thoroughly inspect a gun before purchase when possible, be it used or new. I familiarize myself with the design (via the Internet) as much as possible before I buy, so I know what issues to look for. There's no reason not to consider a used firearm, but as has been said, buyer beware. Great deals can be had, often simply because that gun didn't please the previous owner.