My estimate's that approx. 10% of students cheat at some point in medical school. The most common incidents appear to be sharing question banks from cultural groups (MSA, AAPI, ISA were some guilty when I was in school). It's very similar to frats having "resources" in undergrad. There were too specific tidbits about questions someone told me verbatim prior to the exam and then after the exam, there was an email sent about a suspicious distribution encouraging us to report suspicious activity and I anonymously came forward and turned out my suspicions were correct. It turned out there was a very rough document being circulated with specific details of the exam (not exact questions recreated but something along the lines of "EBV question, CD21, Burkitts lymphoma") and there would be like 300 rows of prompts like that. This can significantly tilt the scale in favor of cheaters because it's oftentimes a few questions which separate the excellent students from the average ones. Ultimately no one was punished with expulsion.
In terms of writing the exams, to quote one the most "loved" professors in pre-clinicals at my school at a curriculum committee meeting "it takes a lot of effort to write one really good question". I recommend some of you who're interested in this read how USMLE/resident board exam questions are selected. It is basically using data to figure out what questions discriminate bad from average from good students. There's quite a process and schools try to replicate it the best they can, however, they do not have the staff nor the time to write completely different exam questions every year so there are definitely many that get repeated. Afterwards people have pretty good memories and remember stuff. At my school in particular, our student committee fought and won the right to have students spend ten minutes after exams to separately come in (approx 30 minutes after everyone finished the exam) and review wrong answers in a proctored setting. While extremely helpful, this is an opportune time for people looking to remember correct answers to do their thing.