Bolts and machine screws are very interesting. One mistake I, an amateur bike mechanic, made for years was not greasing bolts properly before assembly. It sounds counterintuitive but without grease a bolt (or machine screw) will bind early with a high torque well before it is correctly tensioned lengthways. The torque is just a proxy for the tension and it is this tension which is needed to fasten your components tog…
There's another reason to grease them - the grease keeps the water out which prevents corrosion.
In working on my cars, I always use a bit of grease when assembling fasteners. I've never had one come loose, nor have any rusted themselves on.