Most medical school faculty MD's will fall into one of two categories - they can either be clinician educators or clinician scientists. There can be greater variation, but those are the major dividing lines.
What it means though is that in their contract there will be a breakdown of their expected time spent on various activities. A common Full Time Equivalent (FTE) for a Clinician Educator will be 50% Clinical, 30% Education and 20% administrative/Research where as for a Clinician Scientist the breakdown will commonly be 50% Research, 30% Clinical and 20% Education/administrative. Depending on their actual roles, these percentages will be tweaked - for example a Residency Program Director may have as much as 50% administrative time. The educational portion may be directed towards medical students, residents and fellows, possibly in a prescribed ratio depending on clinical field/interest.
So it IS part of the academic physician's contract to give these lectures, just like the PhD's.
As for the community physician - Adjunct or volunteer professors/instructors likely do have contracts/written agreements with the academic medical center outlining the expectations and what's to be provided in both directions. Adjuct faculty might possibly receive a stipend for their time, or reimbursement for their expenses associated with teaching students and residents while volunteers are just that - volunteers. For many community physicians that take on residents to their service (common in many general surgery programs as well as in primary care specialties) the reduction in workload may be their only remittance (they may also consider the early recruitment of talented residents worth it). Being able to list the position on their CV is also a benefit although one that may not pay dividends in the immediate future.