Your windshield is made of laminate glass  which cracks when impacted upon . This glass is made with a plastic interlayer known as PVB (Poly vital butyrol) this material is what holds the two layers of glass together and assists to keep occupants within the cabin of a vehicle and avoid ejection  in the case of a head on collision . The rest of the glass on a vehicle is known as tempered glass , this glass is known to shatter upon impact .  The reason they make this glass to shatter, is to assist in avoiding injury when the glass is impacted upon  to the occupants inside the cab of a vehicle in the case of  a side or rear collision.