I'm not sure that anyone actually nailed the complete reason. I scanned through the response so far but none seem to really cover it.
1. Debian policy -- this is by far the biggest reason, Debian policy is very detailed and packages are required to adhere to it to be in the official repos
2. Debian repository -- it contains nearly all open source software, which combined with 1 makes Debian/Ubuntu based systems much more stable in general
3. deb format -- this is actually more of a toss up but the deb format is still much more flexible than rpm
4. apt -- existed since at least the mid 90s, long before yum was added to replicate the feature on rpm based distros, so not so much a reason now
I might have missed some additional reasons but the above are the biggest. You can still break a Debian/Ubuntu system but that is usually due to using non-official repositories by people who haven't properly made debs, eg some random launchpad ppa, which haven't gone through vetting process via Ubuntu REVU, or lintian, etc.
I've used Debian/been a DD for 13 years, and used Ubuntu/core dev for 7 years. I've used RH/Fedora on and off for 15 years.