I agree with Phyllis. It felt "earned."
The other songs hadn't been totally "realistic." They would be in rehearsal clothes, and then there would be little glimpses of the number fully costumed and lit. Those glimpses were CLEARLY the imagination or fantasy or ambition of the characters. (Unlike in Glee, where the production values suddenly appear for no organic reason.)
So the singing-in-the-streets to singing-on-the-stage at the end of the episode worked for me because, in real life, actresses like that WOULD be singing the song--albeit in their heads--as they woke and showered and dressed and took subways or hailed cabs and as they waited in the waiting room and the other girls were singing. It made perfect sense.
But, even more to the point, as bwayfan said, it's a really good song and the two of them sing the hell out of it. When they started to sing at the same time, I actually got shivers down my spine and felt hairs stand on end--that kind of thing--they way I do sometimes at the climaxes of certain other female duets, like Judy/Barbra or A Boy Like That. It was pure musical-theater magic.