There are several reasons that cause bees to propolise.
Covering up or encapsulating unwanted odours from a surface or material.
Surface finish or more correctly the porosity of the surface concerned.
Filling a gap caused by the proximity of two objects, with an air space (or open space) behind.
Filling a crevice that does not have links to the open air.
Propolis is used to stiffen and strengthen the combs after initial construction.
Filling a void… There is not much difference between filling a gap and filling a void, I make the distinction that a gap is less than a single bee space and a void is more than a double bee space.
Dampening of vibration is the reason that I think is most often overlooked.
The “varnishing” of wooden parts with propolis is not universal, it has two causes… One is a response to the surface texture and is considered a “mechanical” response ie. filling the cavities in a coarse surface. A smoothly machined (planed) surface does not attract the propolising.
The bees will propolise timber from particular species of trees, regardless of the surface texture… One notable type of wood being Western Red Cedar (often used in hive manufacture) this wood has long term aromatic retention and it is thought that this is in some way disliked by the bees. It is not likely that any varnishing of Western Red Cedar is for hygiene purposes, as it is itself highly sterile and anti fungal.
There are some types of wood that attract very heavy deposits of propolis. For example, I had a hive that was quite nasty and so I re-queened it. After this first requeening failed to quell the anger, I picked up the entire hive and barrowed it about 5 metres away from its’s original site. I then put a fresh stand, floor and new brood box on the original site. Using a travelling box, I then fetched 5 frames at a time from the original hive and placed them individually in the fresh hive, inspecting each one of them thoroughly. I eventually found that three of the frames had bunches of bees on the side bars and that these side bars were very heavily propolised, there was also no brood within 100 mm or so of the side bars in question. I placed these frames in an another travelling box and completed the transfer, frame by frame. After I had buttoned up the colony I shook all the bees off the affected frames and took them back to my workshop.
The side bars concerned had been made from an unusual species of timber that I never did identify (we used all sorts of rare woods in another part of the business).
The thick propolising made me realise that the bees did not like it for some reason. I was surprised by the thickness of propolis build up (it was around 6 mm thick mostly). My surprise was due to the fact that I thought the propolis film would have been air tight and the application of a thin continuous covering would have sealed in whatever it was that the bees found repugnant.