UV does not kill microorganisms like chlorine does, but instead UV inactivates them. UV light at a specific wavelength of 254 nm is readily absorbed by the genetic material of microorganisms. The DNA strand is coded with a specific sequence of something called base pairs. The sequence of these base pairs codes for certain characteristics. UV light at 254 nm is readily absorbed at the point on the microorganism's DNA strand which codes for reproduction. A microorganism that cannot reproduce, cannot make colonies and therefore cannot infect when consumed. In other words, the microorganisms have been sterilized or neutered. They will eventually die off.
The picture below shows a DNA strand of a microorganism. You can see where the UV light is absorbed and how a blockage is formed, causing the microorganism to become sterile.