Going to a prestigious medical school can make you a more competitive residency applicant (especially for more selective specialties or for programs at elite academic centers), but the prestige of your medical school is only a single variable among many others. Other variables include board scores, clinical performance, networking/connections, personal statement, letters of recommendation, and interviewing skills.
The job market in medicine is different from those in law, business, and academia, in that there's a shortage of physicians and a huge, unfulfilled demand for medical care. You can go to the trashiest for-profit medical school in the Caribbean and finish the most undesirable rural family medicine residency program in the US, and you will still make a six-figure salary and have the same job as an FM doctor who went to Yale. This economic situation doesn't exist in those other industries—so in those other industries, there's a much wider gap between graduates of elite programs and non-elite programs (e.g., top 14 law schools vs. the others).