Don't forget the central dogma of medical education:
Get into a good college, so you can get into a good medical school, so you can get into a good residency program, so you can get a good fellowship, so you can get a good job or faculty appointment... etc.
Residency programs evaluate you based on several criteria including board scores, basic science grades, clinical grades, AOA status, letters of rec, involvement, medical school attended, etc. Contrary to popular belief, residency is a job with real responsibility. If your medical school has a reputation for producing strong residents, then you may be able to edge out students with better numbers.