Use Magic Device is not a traditional magic skill, which you get with training in the magic arts (and which therefore is not found on the wizard or cleric class skill lists).
It represents the ability, talent and knowledge of the shadowy folks (rogues and bards) to find out how such items work and to use them, even without the formal training.
Clerics or wizards can of course use cleric or wizard items automatically, without having such a skill, but a rogue or bard CAN use the items as well (and even all of them, cleric items, wizard items and anything else), but with less reliability via the Use Magic Device skill!
Bye
Thanee