This short animation from Elsewhere Lab shows why one flash of lightning is heard as a long, rolling rumble instead of a single bang. A lightning stroke heats its whole branching channel almost at once, so every part of the channel sets off its sound at nearly the same moment.
That sound travels at about 343 m/s, the speed of sound in air at around 20 degrees C, or roughly 3 seconds for every kilometre. Sound from the section of the channel nearest to you arrives first as a sharp crack, while sound from sections higher up and further away keeps arriving afterwards. As the narrator puts it, "The spread in arrival times becomes the rumble."
Elsewhere Lab on Facebook