The earliest recorded mention of a pasty in Cornwall is from 1746, and the dish was famously taken down mines, as well as out to sea, hence its sizeable crust, which was used to hold the pasty.
But they also brought along the ingredients of the Cornish pasty. Its widely believed the crimped crust of the Cornish pasty was created so miners could hold them without getting them dirty.