The perception of skylight polarization in the ultraviolet (UV) by many insect species for orientation purposes is rather surprising, because both the degree of linear polarization and the radiance of light from the clear sky are considerably lower in the UV than in the blue or green. In this work we call this the "UV-sky-pol paradox". Although in the past, several attempts have been made to resolve this paradox, none of them was convincing. We present here a possible quantitative resolution to the paradox. We show by a model calculation that if the air layer between a cloud and a ground-based observer is partly sunlit, the degree of linear polarization p of skylight originating from the cloudy region is highest in the UV, because in this spectral range the unpolarized UV-deficient cloudlight dilutes least the polarized light scattered in the air beneath the cloud. Similarly, if the air under foliage is partly sunlit, p of downwelling light from the canopied region is maximal in the UV, because in this part of spectrum the unpolarized UV-deficient green canopylight dilutes least the polarized light scattered in the air beneath the canopy. Therefore, the detection of polarization of downwelling light under clouds or canopies is most advantageous in the UV, in which spectral range the risk is the smallest that the degree of polarization p is lower than the threshold p(tr) of polarization sensitivity in animals. On the other hand, under clear skies there is no favoured wavelength for perception of celestial polarization, because p of skylight is high enough (p > p(tr)) at all wavelengths. We show that there is an analogy between the detection of UV skylight polarization and the polarotactic water detection in the UV. However, insects perceive skylight polarization by UV or blue or green receptors. The question, why they differ in the spectral channel used for the detection of celestial polarization cannot be answered at the present time, because data are insufficient. Nevertheless, we present here one possible atmospheric optical reason why certain visual systems involved in detecting celestial polarization, are specifically tuned to the UV part of the spectrum.