http://hyperphysics.phy-astr.gsu.edu/hbase/geoopt/image.html...
the lens is designed to take rays traveling from optical infinity, and converge all those rays at a focal plane that's (eg) 30 millimeters away, right? well, if you flip the lens around backwards, then it will send out rays towards optical infinity from a focal plane that's 30mm away... which is what a macro lens is.
in fact in the old days people used to use their camera as an enlarger to expose their negative onto prints. The theory was that using the same lens that took the image in reverse would help to correct the abberations of the lens... I am not sure that's actually supportable compared to using a real enlarger lens that's optimized for high-magnification work but it's a neat theory, and possibly better than just using a random crap enlarger lens ;)
now if you really want to have fun... ever wonder why diffraction makes your image softer at smaller apertures? ;)
https://www.cambridgeincolour.com/tutorials/diffraction-phot...