Why do some rocks and crystals form in geometric shapes, like cubes, prisms, etc…?
As I understand it, it has to do with the geometric structure of the specific mineral or crystal right down to the atomic level. Crystals have a regular pattern to them, and they are put together a bit like tinker toys. The pattern can be cubic, or pentahedral, etc. I think if you look up crystals and minerals on the web, you can find quite a few diagrams that will help you understand.