To add, this is from America’s Test Kitchen:
By no means is this pie-and-cheese pairing a modern tradition. It heralds back to the 17th century, when, in England, traditional fruit pies were first paired with dairy-based accoutrements such as custard and—later on—cheese. Cheddar is the most common variety, but there are regional preferences. In parts of Yorkshire, they prefer their regional cheese of Wensleydale. There’s a saying that comes from the area: "An apple pie without the cheese is like a kiss without the squeeze."
English settlers brought the culinary tradition to North America, and it caught on in places where dairy farming flourished and cheese was most accessible—namely, New England and the American Midwest. A cursory search will yield a dozen or so online forums from New Englanders and Midwesterners pondering whether this trend is uniquely theirs, but each region has a different spin on it. While New Englanders like myself are most familiar with the thick slice of extra-sharp cheddar draped over a steaming slice of apple pie, Midwestern traditions often call for baking cheddar right into the pastry to form a savory base for the sweet filling.