On a machine without positional feedback the control runs blind.
If the g-code is (not running incremental in this example) G01 Z-1 F100 but the z axis stalls at Z0 the machine 'believes' it's plunged to Z-1.
If the next line is G01 Z1 F100 the machine only 'knows' it's commanded to move 2 units positive on Z axis. If it makes this move successfully the machine will be at Z2 instead of the expected Z1.
If the machine is running deeper than programmed due to lost steps the first place to look is the retract moves.