Although the architects of the Beehive in Oxford or these hotels on Russell Square were aware of all this maths, we can be pretty sure that the bees haven’t learnt any geometry. But nature, like mathematicians and architects, is keen on efficiency and will form shapes and arrangements that require the least amount of energy. The bees actually start by making roughly circular cells as these are the most effecient use of their wax. But as these pack together the walls bend to create a hexagonal arrangement. You can see how this happens by tossing a handful of marbles in a curved wok – the spherical marbles naturally settle into a hexagonal pattern.
Mathematically hexagonal rooms have many benefits, but they have some practical drawbacks too. Any of the students who have lived in the hexagonal rooms in Oxford will tell you that it can be quite hard to fit normal, predominantly right-angled, furniture into these hexagonal rooms. Some students apparently even went so far as to take to their beds with a saw to make them fit! Which is why most of us won’t be living in a beehive soon.