For certain specialties, the number of residency positions is so limited that medical students have to publish research to be competitive, even if they have no interest in doing so later in their career.
But altogether I sort of agree, the incentives are pretty maligned such that for many it's just easier to become a bad scientist with more publications than a good one with fewer.