With the agitator circulating the load, the UV light would not have to penetrate very far into the water to have all of the load exposed to any benefits the light would offer. I think they were, by and large, gimmicks to appeal to germaphobic Americans when used in washers. In low airflow and semi-sealed system (Filtrator) dryers, they probably did help impart a fresh smell to clothes.
I remember the cabinets at each barber's station at one shop had UV bulbs in the compartments and glass in the doors of those compartments showed the purple light. There was a chain of coin laundries in the late 50s/early 60s with the name VIOLET RAY that claimed some sort of sanitation, but I never got into one to see what the deal was. I also remember, around that time, in some public men's rooms at the Atlanta Airport, maybe, that there were stalls with coin meters on the door and purple light coming from within. The toilet seats must have been on a spring because they were in the upright position against a seat-shaped shroud with a glowing purple tube that must have been the source for germicidal ultraviolet radiation.