Where it goes and why you do not touch it afterwards
The unit selector goes on the first useful line of the program, inside the safety block, before any move and before any offset is called. The reason is that the power up state depends on a machine parameter and on the previous program, so it cannot be assumed. Changing units halfway through a program is worse still: the modal values already set (the feedrate, the R plane of the active cycle, the peck) keep the same number but start meaning something else, and that is why most controls only allow the change at the start.