UV-C light destroys the bacteria that create the smell
Toilet odor is produced by bacteria living on the bowl. They feed on residue left behind after each use and release odor-causing gases. Sprays cover those gases for an hour. Cleaning removes the bacteria for a day. Then they grow back and the smell returns.
UV-C light penetrates the cell walls of these bacteria and destroys their DNA. They can no longer reproduce. They die off. Without living bacteria on the bowl, there is nothing left to produce odor. The smell stops being made.
The device runs this cycle every time you close the lid.