Honey bees, unlike a lot of other insects, don't hibernate but remain active through the winter. However, they can't leave the hive if it is too cold, and in any case there are no flowers from which they can get nectar. For this reason they collect as much nectar as they can when it is available and turn the surplus into honey. This is their food for the winter.
Man discovered honey many thousands of years ago and until the discovery of how to extract sugar from sugar cane and sugar beet it was the only sweetener available. This is why man started to keep bees in hives some three or four thousand years ago.