Expanding on TomTsagk's correct answer, I thought it might help to describe a bit more about why games work like this.
Light in games doesn't really "travel" from the source, to the surface, to the camera, getting obstructed along the way.
To figure out how bright to draw each pixel of a surface based on a given light, we use (or approximate) a math formula that uses the facing direction of the surface and the direction from this point on the surface to the light source. That's it, just the direction it's shining from — we don't typically cast a ray to check if the light actually reaches this pixel, because doing that for every pixel on the screen and checking the ray against all the detailed geometry in the scene is usually still too expensive for realtime games.
So, by default, no game lights cast shadows. The direction to a light stays the same even if there's a shadowcaster in the way, so the math gives us the same brightness value.
If we want to simulate shadows, we have to do that separately. One common way is with what's called a Shadow Map. In this version, before we shade our scene, we first render the scene from the perspective of each light, as though that light were a camera, storing the depth of each pixel it sees into an off-screen texture.
Then, when we shade the scene, we can compare the mathematical distance of this pixel from the light source vs the depth we recorded at the corresponding pixel in the shadow map. If the shadow map depth is smaller, then it means there's another surface between here and the light, and we draw this pixel in shadow instead.
There's a whole lot of cool techniques to make these map-based shadows look nicer, with fewer artifacts/aliasing, but I'll gloss over them for now. Suffice it to say, they're generally not free either.
Because this requires rendering (up to) the whole scene again from each light's perspective — up to six times if it's a point light that shines in all directions {north, south, east, west, up, down}, and we need to re-render the shadow map anytime something moves, this can get very expensive.
So games will often focus their rendering budget on the most important lights in the scene — like the directional sun light — to ensure they have good-looking shadows. Small, short-lived, minor lights like the flash of an explosion are often forgivable if they leak past occluders a little. Often this is more palatable to players than a hitch in the framerate due to a sudden increase in rendering cost from all the extra shadow map rendering and calculation. Especially if it's a busy action scene where fluidity matters more than pixel perfection.