An oldie but fun: First, why bees use them in honeycombs:
Why hexagons, though? It’s a simple matter of geometry. If you want to pack together cells that are identical in shape and size so that they fill all of a flat plane, only three regular shapes (with all sides and angles identical) will work: equilateral triangles, squares, and hexagons. Of these, hexagonal cells require the least total length of wall, compared with triangles or squares of the same area. So it makes sense that bees would choose hexagons, since making wax costs them energy, and they will want to use up as little as possible—just as builders might want to save on the cost of bricks.Philip Ball, “Why Nature Prefers Hexagons” at Nautilus (March 25, 2016)
And in general, hexagons are everywhere:
If you blow a layer of bubbles on the surface of water—a so-called “bubble raft”—the bubbles become hexagonal, or almost so. You’ll never find a raft of square bubbles: If four bubble walls come together, they instantly rearrange into three-wall junctions with more or less equal angles of 120 degrees between them, like the center of the Mercedes-Benz symbol.
Evidently there are no agents shaping these rafts as bees do with their combs. All that’s guiding the pattern are the laws of physics. Those laws evidently have definite preferences, such as the bias toward three-way junctions of bubble walls. The same is true of more complicated foams. If you pile up bubbles in three dimensions by blowing through a straw into a bowl of soapy water you’ll see that when bubble walls meet at a vertex, it’s always a four-way union with angles between the intersecting films roughly equal to about 109 degrees—an angle related to the four-faceted geometric tetrahedron.Philip Ball, “Why Nature Prefers Hexagons” at Nautilus (March 25, 2016)
Like all of mathematics, the hexagons are all just a big accident, right?