The reason a shim is needed is 2 fold with Skylake onward. First you dont want the cooler tipping on the edge of the core as it could chip it. Dead CPU. Second the substrate the CPU die is mounted on is very thin. It bends under pressure from the centre when there is no heat spreader. The shim allows the centre to bend in a small amount before the heatsink makes contact with the shim, then putting pressure on the shim as well. This prevents all the pressure concentrating on the die.