Why some compounds form different crystal structure at different temperature? Lets take an example :-


  Sodium superoxide has three different crystal structure, the marcasite
  structure at nearby 81 K, the pyrite structure between 196 K and 223 K
  and calcium carbide structure at room temperature.


There are many more compounds which have different structure at different temperature. If temperature is increased, bonds breaks, atoms scatters and decomposes into a different product (compound or element) . But this does not happen. Rather bond breaks, atoms rearranges to form a different structure of same compound.  Why does this happen?
You are just entering into the field of Polymorphism. I couldnt find any source for Why polymorphism occurs but you can think about it as Energetically favorable structure at a particular temperature.  

Related - Why polymorphs form?