If you select a single cell within a contiguous region and sort, Excel will keep the cells within a row in that region together.
In the screenshot below, the active cell is in the contiguous range on the right, outlined in green. The rows of that range will stay together when you sort. The range on the left, outlined in red, will not be sorted with the range on the right, so any connection between the two ranges will be lost.
.
.