The grease help to minimize the vibration between rotor/brake pad/brake pad shim/brake piston,Thus stop squeck/squeeling.
It doesn't mention in the internet but I think 2nd reason for greasing/shim is because since pad have some slight lateral movement in the caliper,by greasing the brake pad,it will just glide when pressed by piston caliper so it doesn't give lateral force to the brake piston,it may damage the piston caliper.The piston should see clamping force only(not lateral)
It doesn't mention in the internet but I think 2nd reason for greasing/shim is because since pad have some slight lateral movement in the caliper,by greasing the brake pad,it will just glide when pressed by piston caliper so it doesn't give lateral force to the brake piston,it may damage the piston caliper.The piston should see clamping force only(not lateral)