The gym that I go to made an announcement about a staff member's birthday and invited everyone to sing. Over 100 people started singing in a different key but by the end most everyone was singing in the same key. Made me wonder if anyone had done any research about this phenomenon.
Some quick searches on Google Scholar don't turn up any obvious top results for papers about this exact topic (e.g. "convergence to a key in impromptu group singing").
But I'm sure that the many factors involved have each been researched heavily. I just can't easily find one research paper that brings them all together.
And there really are a lot of factors involved, or at least more than you might think:
Certainly there's musical stuff like aural pitch recognition, and the effects of the sense of "key" in (learned) musical systems, perhaps with variations by song and culture (I doubt that a bunch of Americans like me impromptu-singing "Sakura, Sakura" would tend to converge to one key), and also what sorts of notes individuals pick as a starting note for impromptu singing (where in their range, and what pitches do peoples' ranges tend to cover).
But I think there's also a bunch of group dynamics involved. I'm no expert there, so I don't know how to list out the group dynamics factors that might be involved. I'm guessing that it would probably having to do with expectations about how this particular group should sound together, and the participants' willingness and ability to fulfill those expectations.
For example, I can think of situations where I've purposefully sung off-key from other folks, because it didn't feel right for everything to sound too pretty. I'll do that at work sometimes, when we sing "Happy Birthday", because we're not all choral society types, and so maybe I'm helping "keep it blue-collar" or something, about like what you'd expect impromptu singing in a bar to sound like. It's probably the same reason I don't bust out into a harmony part in those situations: perceived expectations and conformity to them.
Back on the musical side of things, let me point out the obvious: keys have a strong gravity to them, by their very nature. They're a tonic center which places pitches & intervals in context and gives them "meaning" (at least in whatever systems that the participants have learned/adopted), and so of course there will be a strong tendency for randomly-selected keys to converge when they're sung together (at least for starting keys that are sufficiently close to each other and/or for songs that are long enough to allow convergence to happen).
Along those same lines: it can actually be quite hard to sing notes purposefully out of key. Try singing "Happy Birthday" together in parallel fifths with a friend, and try to actually stay correctly parallel the whole way; assuming that you and your friend have any ability to hear & correct pitches, I predict that you'll tend to bobble the pitches you sing as you listen to each other and accidentally try to adjust; to stay on parallel fifths (when the song is not actually "supposed to" sound that way), I find that I often have to strongly ignore what I'm hearing from the other person.
Bottom line again
Anyway, since I couldn't find any research per your question, these are some "next best thing" thoughts about what might be involved in such research, if it were actually to be undertaken.
Maybe a real research it's not been done yet. It's quite logic that at the end all the tonalities a similar because insecure people (insecure in singing) tend to copy other people. An experiment, quite different but with the same result, was done with metronomes, started at different bpm and stopped with the same bpm (the video here). I know it is not the same but the question remind me this experiment.