The nectar brought to the hive by the bees is about 60% water. The bees
"cure" it to about 18-19% water. At this level of water and with a pH of
3-4, the honey is very stable and can last for literally centuries. (It
was found in Egyptian tombs.) However, it is - as you mention -
hydroscopic. (I believe there is such a word.) If it is left exposed to
the air, it will absorb water from the air. The greater concentration of
water allows yeast (that is found naturally in the environment) to
multiply. A by product of the yeast is alcohol - the honey ferments. If
the correct yeast is present (and naturally occurring yeast is not such)
is produces a drink known as mead. If allowed to ferment naturally, honey
develops an unpalatable taste... though it is still sometimes used in
baking where the alcohol is evaporated from the honey.
The bees prevent the fermentation of the honey by sealing the honey in the
honey comb. When we harvest the honey, we can leave it in the comb or
extract it and seal it in jars, like the shelves of your local grocery store.
Because honey is hygroscopic, it is extends the shelf-life of baked
goods. They are less likely to dry out because the honey absorbs moisture
from the surrounding air. If you want to try this out, bake a batch of
cookies using sugar. Then make a second batch replacing half of the sugar
with honey. To do this you need to reduce the liquids in the recipe by
1/4 cup for each cup of honey (because of the water in the honey...
remember, about 19%) and reduce the cooking temperature by 25
degrees. See which batch survives longer.