Carbon can exist as both diamond and wurtzite structures (lonsdaleite), but diamonds are much more common than lonsdaleites in nature. Some materials like GaN preferentially form wurtzite structures. Why do minerals have such preference? Both diamond structure and wurtzite structure have similar compactness (like FCC and HCP). Moreover, in both diamond and wurtzite structures each atom is connected with four atoms in a tetrahedral symmetry, which means the local environment of atoms should be nearly the same (which is unlike FCC and HCP).
Why do some minerals prefer diamond structures while others prefer wurtzite structures?
Different quantum orbital structures of elements lead to different bonding geometries. These in turn produce different crystal structures. Each element is unique when it comes to these orbital structures so the preferred stable configuration of different minerals is also unique.