The custom of playing a set, or suite for dancing was common enough in Baroque times that it was a standard form for composition--in those times, it generally included several different dances--or at least dance figures--Since set dances all sort evolved from middle ages court dance, it is likely that the custom came from that time, as well--
My experience has been (though I have played more Eastern and Central Erpean folk music than anything else) is that often the grouping of tunes and dances differs from one community to another--even when the dances and the tunes themselves are the same--