The functionality of the head clearance starts with adding some space between piston and head to take care that the piston will not hit it due flex and play in the system. At higher rpm the krankshaft will bend a little due the forces the piston creates.
Then the total volume is making the compression. Compression, nitro content, glowplug number and outside temp are working together for the ignition timing. Changing one of these will shift the ignition timing. Glowplug and outside temp in a small factor, headshims and nitro content in a larger factor. So when one is changed you know with which one you can correct it.
The bending of the crankshaft at higher rpm has also a function. At hiher rpm the piston gets higher, getting closer to the head, resultinh into a higher compression, that will work as a distributer advance