Could she be afraid/apprehensive of the bathroom/toilet for some reason?
At 5 i suddenly started feeling like i hadn't fully emptied my bladder and started spending half an hour, and hour, etc sitting on the toilet. I'd get incredibly stressed out, upset, anxious, panic, and would eventually have to force myself off the loo. I was afraid if my bladder wasn't fully empty i'd have an accident (it felt like if you stop yourself mid flow).
I had all sorts of tests, no infection, scans, no deformations, no twisted bowel etc, so no physical reason for the feeling i was getting.
It has destroyed my life. The toilet has, and still does, rule my whole world. I have a very vivid memory of my gran, standing in the bathroom doorway one morning when i was severely late for school (we're talking almost 2 hours) because i just could not get off the toilet as i couldn't get myself to feel like my bladder was empty. She was screaming at me and threatened to physically drag me off the toilet and i still remember the fear and panic i felt that she would do it.
I developed full blown OCD about using the toilet, with ritualised ways to actually wee, to have to strain like im constipated to force out anything left in my bladder to make sure it is empty, ritualised ways to wipe and clean myself after. It takes me at least 45 minutes every time i use the loo. It has in all likelihood lead to me now suffering from over active bladder, as i severely restricted my fluid intake for years so was constantly dehydrated, i get recurrent UTI's, and after roughly half an hour to an hour after using the loo i get this feeling like im full to bursting and desperate, if i don't lie down, i'd have an accident. Sitting down used to work, but now only lying down does. If i try going to the loo, i can have as little as an egg cup full of fluid in there and i'd literally be in the loo every other hour, so i need a carer to do things as i physically cannot stand up to cook, clean or do anything for myself, and on top of it all im germphobic so wetting myself would feel like the end of the world, it's my biggest fear.
I have so many "what if" questions, if only they had found something physically wrong or tried some form of psychological treatment when i was a child, i wouldn't be virtually housebound with no life. I'm begging you, get your daughter referred to anyone and everyone you can to get this sorted, you never know what it could turn in to.