I was confused by this because I thought glass blocked UV, but apparently it lets UV-A through and only blocks UV-B and UV-C: https://hps.org/publicinformation/ate/q12082.html
I also found a study that suggests UV-A might not be effective against viruses (although at a guess they're not a common contaminant in drinking water compared to bacteria): https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8701782/