You have to distinguish between work in the physics sense and work in the biomechanical sense. In the physics sense, you do the same amount of work (ignoring rolling resistance, etc). In the biomechanical sense, you do more work zig-zagging back and forth but you are doing that more work over a longer period of time and are able to do it with less power (which is work done per unit time, e.g., work per second).