Adaptation and advantage–consider vision–the sight of a hawk or the night vision of a predator for example–now an experiment shows that cats and dogs may see UV light.
Infrared vision makes our military very effective at night–UV light opens up another spectrum of sight that provides advantages.
Eye structure also makes a difference, for example night and low light vision in predator and prey animals. Position of he eyes for field of vision is adaptive and advantageous, for example my horse see close to 180 on both sides because of eye position. They have a very small blind spot–don’t violate it without warning them or you might get kicked.
If you think UV light isn’t helpful, get a “black” light and you’ll see urine on your carpets where fido was, for example. We use UV light and flourescein to detect defects in your cornea if you kept your contacts in too long or got your cornea (the clear cover for your pupil) scratched.