A gun will not go off by itself. However people make mistakes all the time. Some guns are very unforgiving, while some are fairly forgiving. One of my friends no longer carries his 1911, because he found out twice that the safety was off when he took it out of the holster at the end of the day. A 1911 cocked but not locked takes just a touch of the trigger to fire when you grab the gun. A Glock is better but things seem to be able to get to the trigger from time to time. There are tons of YouTube videos of someone holstering a Glock and having an AD. A double action gun seems to have the lowest chance of accidental discharge. It is not zero, but as low as possible.
Yep, understood. However, if you're careful, you can carry most modern guns safely by following the 4 rules and paying attention to what you're doing. A good holster makes a difference, as does always practicing gun safety. AD's occur because people weren't paying attention and did something they shouldn't have done. Your buddy with the 1911 was perfectly safe with the safety off, as long as he kept his finger (and everything else) off the trigger. Double action guns are great for those who train with them so that they're accurate with the heavier trigger. I carry a P10C every day and have no issue, with one in the pipe and no external safety. The only way I'll have an issue is if I do a dumb.