It is somewhat a tradition but not for very long.
Usually, a foreign head of state or the US president does it, for example, Richard Nixon in 1971 and the queen of Thailand in 1980.
I'm not sure about the very first instance of it, but it's been going on for at least several decades.
Am I allowed to recommend sources after 1994? If so, and you're interested in cadet life, check out Absolutely American by David Lipsky and A Civil War by John Feinstein.