Out of order operations on AnyCubic Prusa-I3 clone
This is just your slicer doing this. If you inspect the G-code file, you will see that the printer is faithfully doing what the slicer told it to. Most slicers use a fairly simple heuristic for determining the order in which lines are processed, which sometimes comes up with sub-optimal solutions like these.