Planets form in a spherical shape due to the force of gravity minimizing the potential energy. Rapidly spinning "rubble pile" asteroids such as Bennu and Ryugu form a diamond shape due to a combination of gravity, centrifugal force, and the cohesive forces that form conical piles of accreting material on earth.

Diamond profile asteroids. Near-earth asteroids a Ryugu and b Bennu. Yellow blocks added to panel b suggest accumulated material: note that material nearer the poles feels weaker centrifugal force than material at mid- or low- latitudes. Region in green square is enlarged in Fig. 2a. c Analytic prediction from Eq. 1 using α=0.999,μ=0.4α=0.999,μ=0.4. d Exterior surface defined by discrete element simulation described in text. Image credits Ryugu: JAXA, Bennu: NASA
More...
Bennu and Ryugu: diamonds in the sky | SpringerLink