Whether tracked mentally or written down, I assume Terry Pratchett had a list of topics he wanted to present through the unique lens of the Disc. And he got through dozens upon dozens of these topics. Readers knew football / soccer / foot-the-ball had to be there somewhere on the list, and indeed in the thirty-seventh novel up it popped in Unseen Academicals (2009). A topic beloved by millions if not billions, one can only assume Pratchett was waiting til he had the right story, the right combination of ingredients, to do the sport justice in Discworld. Let's see what they were.
The portions plying the pot of Unseen Academicals are: ten cups of wizard, one stein of goblin, two hurlyhoos of female Unseen University kitchen staff, various dashes and splashes of Ankh-Morpork streetlife, the unpeeled onion of Veterinari, oh, and one, large orange librarian (with banana). The spice setting the stew afire is the discovery of a certain pornographic vase at Unseen University featuring ancient men at play in foot-the-ball. A set of gentlemanly rules discovered inside the vase, Veternari makes the case that foot-the-ball needs to be converted from a pie-eating, tooth-knocking, rough-housing affair on Ankh-Morpork's streets to the next level of respectability; it needs proper goals and a field judge. He asks the wizards to field a new team and stage an exhibition match. Away we go!