Considering that sound can't travel through vacuum.
In one of the many, many shows that covered scientific inadequecies in Star Wars, it was explained that because the engines used ions, and space is not truly empty, the sound was transmitted through the little gas that was there. I guess this could explain why few ships actually used thrusters to change attitude in space also. Weak, but it was all they could come up with.
Not just explosions, you can hear music, too. With any possible reasons to describe explosion hearing, you can't explain the music. So, it's clear: Explosions are heard by us only (we are third persons outside movie). Definitely, Skywalker & Kenobi would be unable to hear explosions..
The claim that explosion sound effects in the vacuum of space is "wrong" assumes that the microphone is at the same place as the camera. But neither the microphone nor the camera are part of the story; they're part of the medium through which the story is told.
The canon novel Lords of the Sith makes explicit the fact that characters in-universe cannot hear explosions in the vacuum of space. For example, on page 16:
[Vader's] interceptor streaked toward the gun bubble, aimed directly at it. Content with the trajectory, he unstrapped himself, overrode the interceptor’s safeties, threw open the cockpit hatch, and ejected into space.
Immediately he was spinning in the zero-g, the ship and stars alternating positions with rapidity. Yet he kept his mental hold on the air-lock handle, and his armor, sealed and pressurized, sustained him in the vacuum. The respirator was loud in his ears.
His ship slammed into the gun bubble and the transport, the inability of the vacuum to transmit sound causing the collision to occur in eerie silence. Fire flared for a moment, but only a moment before the vacuum extinguished it.
We therefore have to interpret the sounds we hear in the films as an out-of-universe artifact (i.e. as observers, we can hear the sound of a ship exploding as if we were inside the ship itself).
If you're looking for some kind of excuse try claiming that the explosions are hot enough to create plasma and you are listening to a unfiltered radio receiver.
It's not a great explanation---the details aren't right---but for something to hang suspension of disbelief on, it'll do.
And it covers the guns, too, if they work on magnetohydrodynamic principles.
It was learned with 2001: A Space Odyssey, released in 1968, that 100% pure space realism doesn't make for good sound design. It managed to be dramatic enough through its own silence, but that was part of the art of the film.
When audiences see an explosion, they expect to hear it. That's been our experience since birth; things that drop make a noise when they hit, and things that explode make a bang. This is so ingrained in us that many times even depictions of real explosions in documentary-type shows, filmed from a distance for safety, have the explosion part of the soundtrack brought up to match the blast. Otherwise, we'd think that they screwed up the sound-to-video matchup in post-production.
So, out-of-universe, most space sci-fi movies have put sounds in space; the Enterprise whooshing by, sounds of phasers, blasters and torpedos heard in shots taken from an in-space POV, even the "puff" of thrusters firing in Apollo 13 (which was very technically accurate in most other respects). Sometimes it can be explained that, although the POV is outside, we're listening to what someone inside the ship that we're looking at would hear reverberating from the hull of the ship through the inside atmosphere; that explains 99.9% of the sounds in Apollo 13. However, most of the Star Trek and Star Wars sound design simply cannot be backed up by real physics; it's simply more dramatic to engage both sight and sound in a movie, and when that movie is in a theater, even feel (as the shock wave of the sound reproduction of the explosion "hits" you, and low rumbles resonate in your seat).
I can think of only one of the "pop" sci-fi movies after 2001:ASO where the silence of space was ever illustrated, and that's the new Star Trek, where the woman is sucked out through a hull breach in the Kelvin into the vacuum in the initial scenes; the full perspective of the battle is right in front of you but I think even the explosions and phaser fire is cut out, leaving just a subdued music track for the shot of her floating away amidst debris from the Kelvin and weapons fire from both ships. Again, its sole purpose is not technical accuracy but rather drama; our rational mind expects silence in a vacuum, so we get a taste, and we suspend disbelief and are sucked into the universe of the movie, after which they can do whatever they want sound-wise (like the "light-speed boom" of a ship entering Warp).
I heard JMS once say that an astrophysicist told him that you CAN hear explosions in space - just not the way they sound in movies. Specifically, if you have an explosion, part of the makeup of that explosion is something that will carry the sound waves (like oxygen). So when the (whatever) explodes, you'll "hear" it when the gases involved in the explosion reach you.
I was under the impression that, on some scenes, it was done properly.
For instance, when Fett was chasing Obi-Wan in the asteroid, the sound from the explosions had a delay. Which was the time required for the shockwave to reach the ship.
EDIT: When I said shockwave, I meant the shrapnel + gas + whatever was expanding in those explosions. Those would reach the ship and transmit the vibrations.
Depending on the distance to the explosion, that could produce a considerable amount of sound inside the cabin (which does have air), but not damaging the ship in any significant way.
Pablo Hidalgo (Head of the Lucasfilm's Star Wars Story Group) spoke to this in a recent tweet. In short, ships in the Star Wars universe don't travel through pure vacuum. They instead travel through a form of invisible matter called "ether".
Among other things, this explains how the audible compression waves that would be caused by an explosion in air can also be heard in space.
PH: If you need to, you could say the interstellar medium in Star Wars does have an ether, which would explain such pulpy things as sound, concussion rings, visible drag, and such odd tech callouts as "an etheric rudder" from Heir to the Empire. Only if you ⋆really⋆ need to, though.
Like if it helps you sleep at night and whatnot.
I seem to recall somewhere - maybe in the A New Hope novelization - Han explaining that the sounds are added by the ship's computer, based on its sensor data, as a way to alert personnel (gunners in this case) about the position of ships without taking their eyes off the sights or needing a lot of interpretation.
So if your ship - say an X-Wing - picks up an exploding TIE fighter off on the left, it plays an appropriate sound, and you know that the TIE fighter on the left blew up without having to look at it. If it detects something coming up alongside you, it plays an appropriate engine noise. That sort of thing.
It doesn't explain every scene, but most space scenes took part around huge spaceships and stations. They had their own gravity field so they could have their own atmosphere (especially death star).