The difference comes in the actual training which occurs in the program. You are right that the MD degree is somewhat worthless without residency and the DDS or DMD is all a dentist needs to practice. The reason for this actually comes in what is entailed in the education itself. I may catch flack for it, but dentists do not learn the depth and range of knowledge that MD students have in most curriculums. This is not to say that we do not learn medical knowledge, we do, but on certain subjects, MD students learn a little greater detail. That's how I feel knowing quite a few medical students and seeing what they learn. While I can hold my own in my knowledge, they definitely seem to spend more time getting more detailed in some areas than I did in school.
On the other hand, what medical students learn as far as working with patients and diagnosis and treatment of patients is very superficial in comparison to what dentists in a DDS or DMD program get. A lot of what we do in dental school during our last 2 years and sometimes in our last 3 years is far more hands on. While medical students have some training, it is so far ranging and scattered across the many fields of medicine, that a student graduating with an MD really hasn't developed the specialized skills for any one field of medicine to be able to simply dive in without any supervision. In Medical school you might spend 3-4 weeks on a Psych rotation or a month in OB/Gyn. This one month of specialized rotation is not really enough to then open up shop as an OB/Gyn or Psychiatrist. Compare that to the 2-3 years of specialized, hands-on training dentists get in only working on people's gums, jaw bones, teeth and oral cavity and you can start to understand the difference in why one degree allows us to start working immediately while the other requires a further residency.
If other areas of medicine wanted to be like dentistry, and had broken off from medicine much earlier on like dentistry did, they could probably do so. For example, let's take opthamology for example. What if to be a Opthamologist they decide to remove it from regular medical education. You take the normal MD program and instead cut out all the clinical rotations in fields not related to opthamology. You get another month back each from say: OB/Gyn, Psych, Internal Med, general surgery, plastics, Derm, etc. It ends up adding up to a lot of time. You then spend all that time learning mostly about Opthamology and getting enough background on Pharm, Anatomy, etc. to also still understand how what you do in opthamology may effect and have an effect on the rest of the body. You could greatly shorten the time taken to learn the field and begin practice.