Answer:
'It allows the bacterium to produce a dormant and highly resistant cell to preserve the cell's genetic material in times of extreme stress. Endospores can survive environmental assaults that would normally kill the bacterium.'
credits to the rightful owner of this answer for this answer. I hope this helps you :)