The word "bee" has long been used to describe a busy gathering of people who come together for a special purpose, such as quilting, spinning, logging, or raising a barn. "Spelling bee" in particular is an American term that came into use by the 1870s.
Many think that this use of "bee" was inspired by the hard-working social insect of the same name. But some scholars believe it comes from the Middle English "bene," meaning a favor, which was sometimes used to describe neighbors helping out with a particular activity.