A story of eastern European origin probably derives from a time when many gods were worshipped, later being altered to conform with the Christian monotheistic concept:
The devil was spying on God when He was creating the birds and insects. God took a bit of mist from the air, spun it in His fingers and called out the name of the new creature, “Bee!” And so the first bee was brought to life. The devil was a bit confused by what he saw and thought that God had called the creature into existence by telling it to “Be!” So when he tried a similar trick, gathering up a bit of clay from the earth and mixing it with his own sweat he told it to “Fly!” Of course, in this way it was not another beautiful bee that was formed but the ugly and pesky fly that, ever since, has plagued humans as much as bees have benefitted them.
(The author altered the “letter” of the story a bit to maintain its spirit. In the original, Hungarian, version the word-play centers on “legy” meaning both “become” and a “fly”).