When machining multiple contours in a single 2D Contour operation, the order in which the contours are machined is determined automatically. This works well for complex examples, but in some cases the ordering might not be as desired.
To manually control the ordering, select the individual contours in the order in which they should be machined and enable the Preserve order check box on the Passes tab.
Manually selected contours
The Preserve order option on the Passes tab
The resulting toolpaths:
Preserve order disabled
Preserve order enabled