They are not legally married. It was to her, a special day. And probably for the 'groom' as well since they were so close and had been through so much together in their illness.
Do you honestly think that his marriage is legal and that if she somehow miraculously survives, that they would be considered legally bound? This basically was a mock wedding where she gets to wear the special dress and throw the bouquet. I'll admit, my initial thought was to the poor kid who was the groom. But then I thought about it for a few seconds and realised that he would grieve her loss regardless because they were so close. To him, it was a way to make those last few days she has left brighter than it would normally have been.
Does it really matter? What? Do you think that they're going to have a honeymoon and have sex because they are "married"?
Place yourself in her parent's position where they face the horrendous prospect of losing their beloved child in a matter of weeks. You're telling me you'd tell your child to be practical and realistic if she made such a request in her dying days? Ya, right.
These parents obviously want her to have whatever special moments she wants to have. She wanted to be a princess bride and have a fairytale wedding, they gave it to her. It isn't legally binding and the 'groom' is obviously someone who cares very much for her and suffered quite a bit alongside her in his illness and wanted to make her happy.
Be thankful that there are still people in this world who care so much about others that they are willing to put aside a few hours of their time to put a smile on the face of a dying girl, even if it is a "wedding".