In areas with bright sunlight and cool/cold winters, it's used to prevent sunscald [the whitewash reflects the sun's heat that causes cell damage on the trunks of dormant trees].
However, I've also seen it on palm trees in the tropics....probably more for insects [you can see their boring holds much easier].