... Under any conditions, firing one's weapon into the air is unsafe.
I would suggest that under any conditions, firing one's weapon at all is unsafe. But it happens. Doing unsafe things is neither illegal nor punishable in itself.
Does anyone know how and why the bullet in the case we are discussing managed to travel 3 km before landing?