According to the Laws of Harvard College of 1807: Every Candidate for either Degree shall attend the public procession, on Commencement Day, to and from the College.
Most universities in the United States follow to varying degrees a uniform code, first published in 1895.