So by moving the lens forward from its flange distance you magnify the image BUT you also lose the far limit capabilities of the lens as you change its DEPTH OF FIELD.
As an example the register distance (flange length) of the M42 mount is 45.46mm. Let us assume you have a DSLR that is designed for this lens. In order to allow focus to infinity with a 50mm enlarger lens, the rear nodal point of the enlarger lens needs to be (surprise!) 50mm from the centre of the sensor. If you move it further away than this you will magnify the image BUT longer have infinity focus as you will change what is called the hyperlocal distance and thus DEPTH OF FIELD