The story
From sport (“(archaic) to close or shut (a door)”) and oak (“outer (lockable) door of a set of rooms in a college (especially of the University of Cambridge or University of Oxford) or similar institution, especially one made of oak wood”). Compare French trouver visage de bois (“to find no one at home”, literally “to find a wooden face (that is, the door)”).
Etymology from Wiktionary, CC BY-SA 4.0.