The longer wavelengths are able to bend around the building and reach you, whereas the shorter wavelegnth sounds cannot. Once the truck comes around the building and there is no longer an obstacle between you, all the sounds can reach you evenly.
Work Step by Step
When you first hear the truck, sound waves are diffracting around the building. Longer wavelengths (i.e., low frequencies) are more easily diffracted more than shorter wavelengths (i.e., higher frequencies), so you receive mostly long wavelengths. After the truck rounds the corner, you receive all the emitted waves directly, and the sound “brightens” because now you hear the previously absent high-frequency components.