Why do lightning is accompanied with thunder?

The correct question would be why does thunder happen with lightning. Lightning is essentially superheated electrified gas. It is so hot infact that the air around it gets superheated and expands, creating a semi vacuum in place of where there was once just air, and then plasma (lightning). All that air comes crashing back together creating the sound we call thunder.