A contributor (David Shulman) to American Speech dug up a neat early description of the first expression, which he found in Thomas W. Lawton’s The Krank: His Language and What It Means (1888):
“Playing to the Grand-Stand. To accomplish this it is only necessary to smile, strike an attitude, and strike out.”
That is too often true, not only in baseball, as Lawton gives it, but in any sport or stage endeavor or whatever in which the performer strives or appears to strive to win the plaudits of the spectators, to show off his self-acclaimed marvelous skill or ability, especially to those he wishes to impress in the near-by high-priced grandstand seats.
But one who attempts a grandstand-play, as we call it, must be very sure that he can carry it through, otherwise he may fall flat on his face and meet with hoots of derision.
The earlier saying, “playing to the gallery,” is still very much in use.
Originally it had reference to those actors, especially in an English theater, who, going over the heads of the near-by, and frequently inattentive, occupants of orchestra seats or stalls, deliberately overacted their roles in seeking to gain the approval of the larger populace in the gallery.
One had to shout and strike exaggerated attitudes and employ exaggerated gestures, just as the street orator, senator, or M.P. does today who is addressing his remarks primarily to the “dear peepul.”