Flowers appeared on Earth 100 to 150 million years ago. Solitary bees appeared 25 millions ago and they became social insects about 10 to 20 millions years ago. Of course, man was not there yet at that time.
Apis mellifera (literally 'bee bringing honey') is the honey bee we know. Its name shows that at first men thought that bees carried honey from the flowers to the hive. It was only later that men understood that bees actually made honey. Of course bees do not make honey only for us to make mead, honey is used as food by the bees.
At first men got the honey from hives in rocks or hollow trees, only later did they bring the hives to them. The problem is: if bees are "wild" animals, who owns the honey? In the XIVth and XVth centuries, bigres in France and Zeidler in Germany were in charge of honey bees.
"Avons droit d'avoir et tenir en la dite forest un bigre lequel peut prendre des mouches, miel et cire pour le luminaire de notre eglise, marquer, couper et abattre les arbres où elles seront sans aucun danger de reprise."This text stating the rights of a lord means
"We have the right to have in the said forest a bigre who can take bees, honey and wax for the lighting of our church, mark, cut and cut down trees where they [the bees] are not at risk of being caught [if the swarm cannot be caught without cutting down the tree, then...]"
Trees holding swarms were cut down and brought close to houses where the bees could be looked after and where honey was easier to get. This is the basis of beekeeping. Earlier on, 4 500 years ago, Egyptians already kept bees in artificial shelters (rough hives.) Touthmonis III made bee the symbol of Low-Egypt. Many dynasty up to the Ptolemies, use the same hierogph for the bee and the pharaon.