hi! Could you specify which region/culture you're interested in - e.g. Greece, Nepal, the Maya, etc. That will help the appropriate historian(s) provide a meaningful response. Thanks!
Bees were kept, but not like today. Today, bees are kept in movable-comb beehives, which enables harvesting the honey without harming the bee colony. In ancient times, bees were kept in immovable-comb beehives, which were simply appropriately-sized vessels where the bees would build they comb naturally, and harvesting the honey would often mean destruction of the entire colony.
Also, before honey extractors were invented, people would eat comb honey, or honey would be pressed out from the comb.
Speaking for the Middle East, it was customary to burn a big leaf of a dates tree (in the hot regions) or a wooden log, an then smoke the beehive. The bees will, to my understanding, go into a state of duzzines or calm down, this way enables the honey traders to collect the honey in a much easier way. The beehives are commonly found in or on trees, whereby in Jerusalem or other mountianious regions you can find bee hives in the mountians.