What is the origin of the idiom "Put on a clinic"?
The original question asked about the idiom put on a clinic to mean "to perform exceptionally well." While the term originated with medical clinics and was transferred, as OED notes, to non-medical sessions "for instruction in or the study of a particular subject", the idiomatic use of demonstrating how to do something well through performance, rather than through formal instruction, came later.
It has been used extensively in sports. The earliest I've found is a 1936 article about a pitcher with the Little Rock Travelers of the minor league Southern Association in a game against the Birmingham Barons:
Lee Rogers is one of the best left-handed curve ball pitchers in the league. He stepped out Monday with everything under control and proceeded to put on a pitching clinic. -- Zipp Newman, Birmingham News, April 29, 1936, p18
I'd call it a metaphor. Like a metaphor, anyone hearing it can figure out the intent and think it seems clever, and anyone who gets the idea can make up a new version.
The overall metaphor is that it looks like we're watching an excellent instructor teaching in a classroom setting. I suppose that's the origin, but not in the sense of how an idiom has one particular place where the phrase made sense. Older variants are the pitcher might show us how it's done, or school us in how to strike someone out, or demonstrated his pitching skill (as in -- it looked as if he was giving a demonstration, instead of playing in a real game), or put on a fine display of pitching skill. Put on a clinic is just more in the same vein. We could go on and invent "she gave us a master class in pitching".
It stems from a shift of meaning and emphasis
Etymonline
clinic (n.) 1620s, "bedridden person, one confined to his bed by sickness," from French clinique (17c.), from Latin clinicus "physician that visits patients in their beds," from Greek klinike (techne) "(practice) at the sickbed," from klinikos "of the bed," from kline "bed, couch, that on which one lies," from suffixed form of PIE root *klei- "to lean."
Also "one who defers baptism until the death-bed" (1660s). Sense of "private hospital" is from 1884, from German Klinik in this sense, itself from French clinique, via the notion of "bedside medical education, examination of a patient by an instructor in the presence of students."
The modern sense thus reverses the classical one, in which the "clinic" came to the patient. General sense of "conference for group instruction in something" is from 1919.
The idea of group instruction was extended from medicine to other areas:
Merriam Webster
Clinic:
a group meeting devoted to the analysis and solution of concrete problems or to the acquiring of specific skills or knowledge
The person offering or providing such a clinic would necessarily by knowledgeable and authoritative, so would become respected. Putting on a clinic became a symbol of such success.
The idiom putting on … occurs elsewhere as in putting on a show, putting on airs
Cambridge
Put on:
to do an activity, esp. one that others can watch:
clinic (n.)
Transferred—An institution, class, conference, etc., for instruction in or the study of a particular subject; a seminar. Chiefly U.S.
1919 British Manufacturer Nov. 30/2 In order to solve this difficult problem in economic diagnosis, we need a clinic just as the doctor does.
OED, with earliest citation (see Anton's answer for more on the etymology).
Regular meetings are held the third Thursday of each month, usually at one of the offices or preceded by a dinner at one of the hotels. A committee has been appointed to put on a clinic about March first. Bulletin of the Colorado State Dental Association, Volumes 1-2 (Snippet View. The date on the Google search-results page (not always reliable) is 1917, so this example may be from 1917 or 1918)
A number of the earliest examples in Google Books for clinics being "put on" are from state dental associations.