In those instances, All, the alarm is supposed to wake the parent, who then runs into the bedroom clanging banging and shouting, shaking the child, putting the lights on brightly, and essentially making sure they wake up by whatever means.
Within a few nights of that deeply unpleasant experience, the subconscious adjusts and records that peeing is the trigger for the uproar, and so either the body withholds, or the kid practically sleepwalks itself to the bog.
Believe me, all three of mine sleep through fire alarms.
It wasn't much fun having to force my 8 year old awake with bright lights, clapping, shouting and shaking her, but she was completely dry within two weeks.
Two reasons for night wetting - deep sleep and lack of production of the right hormone.
Enuresis alarms fix the deep sleep. (With the parents help at first as they are the ones woken)
Meds fix the hormone issue.
Some kids obviously need both, as they don't produce the hormone, and are deep sleepers.