From my memory, folks were hanging out in the discord (the discord came before the website as a group of folks who wanted to start a different kind of community) and were talking about possibilities for the site. Early on there was talk of developing something from scratch (in fact, I think a working prototype was developed before it was decided to pivot to lemmy) and the admins needed something to name the github repo. As I recall somebody stuck their head in and just said the word "beehaw" and it stuck. I could be mixing things up, the timeline is a bit fuzzy and it's possible there were other discussions happening that I wasn't aware of. But as far as I remember it pretty much came out of nowhere and everybody just kinda shrugged and said, "that's the one".
To add to this, I dug up old stuff and it turns out this was probably because the same person who came up with the name had a few hours prior suggested we use this great bee art for the server icon!