For crying out loud, it's a math problem. Just humor me, will you, groove with it and accept there are n boys and n girls? Of course I could have asked about pairing of elements A1..An and B1..Bn with a matrix of preferences for each, but whatever. If it's a problem that for a prom dance there would be n boys and n girls, fine, let's say that if they don't match up otherwise, then George and Henry will be suitably motivated by the headmaster, and end up called Georgina and Henriette for the duration of the prom. If that doesn't suffice, Arnold the PE teacher joins in too, possibly in a skirt and calling himself Arnoldine, and almost certainly ending up as the least appealing 'girl'. By hook or crook, it is possible to end up with as many boys (or "boys" ) and girls (or "girls" ), n of each.
I don't find it it obvious that some would be left without partners, if the problem is as it was written. Even the most hideous boy will be on every girl's list, though probably in the last place. Ditto for girls. So if John Blutarsky is the first boy in line, showing up a bit drunk in wearing nothing but a toga, and his first choice is Candy the captain of the cheer leader team, then Candy has to accept John. The two are a pair even if he is the last choice on Candy's list, and will keep her as his partner until or unless someone whom Candy finds more appealing asks her to be with him instead of with John. So, as I see it, it is not obvious anyone would be left without a partner; it could be unlikely, or even impossible for that to happen. But is it?
Boys asking vs girls asking:
Alan wants Alice first, Beatrice second.
Bob wants Beatrice first, Alice second.
Alice wants Bob first, Alan second.
Beatrice wants Alan first, Bob second.
What happens? If boys ask,
Alan asks Alice. She has no partner so she has to say yes.
Bob asks Beatrice. She has no partner either so she too has to say yes.
And that's where it ends. Alan-Alice, Bob-Beatrice.
But if the girls do the asking, Alice asks Bob, Beatrice asks Alan and the girls are happy and stop asking. So it's Alice-Bob, Beatrice-Alan, not Alan-Alice, Bob-Beatrice.
Is that a rare special case, or is it commonplace for the pairs to differ depending on whether the girls or the boys do the asking?