Making cells of carton or wax is metabolically expensive. Shapes that conserve material in making the cells would be selected for. That hexagonal shape appears to be the most efficient shape for housing larvae or honey.
Note that mud-dauber wasps' nests have cells that are generally cylindrical. The mud walls are thicker than would be true if they were hexagonal. That suggests that gathering mud to make nests is less costly than carton or wax.
They are actually round cylinders that are squeezed into a hexagonal shape. Look at the outer portion of drone cells beyond the worker cell walls. Bumble bee cells are round spheres of wax..