That's one of the things I LOVE about this show. The ending is so ambiguous it can be taken so many ways. I'd never really given it much thought, just kind of assumed it was a two halves joining into one thing, until seeing the show again this past Sunday when a different theory popped into my head...
What if HEDWIG wasn't real? What if HEDWIG and her story were all an invention of Tommy's, in his head. He is so messed up from his repressed upbringing, and not being able to deal with his own sexuality that he invented this other persona to deal and by the end of the show he has moved on and doesn't need her any more and that is why he hands her off to Yitzak who is the one who needs her now. Tommy can now move on with his life as a complete individual.
Again, I'm not saying this is what I fully believe, but I thought it was an interesting interpretation to add to the mix.
<-- Tevye, FIDDLER ON THE ROOF, March 2018