Here's some more to learn:
Many aircarft get rid of them, simply because you don't really benefit much from carrying empty cases.
P-51, F-80, etc all got rid of the brass.
Helicopters habitually ditch the empties, as power is a premium, and no useless weight is really wanted.
While empties may be a hazard to ground troops, they are certainly not as much of a hazard as shooting so close to them that they'd bet hit by the empties is in the first place. If you're that close, they have more to worry about than empty brass. Some F-80's shot CAS gun runs on Chinese close enough to hit our guys with brass from the .50s. In Somalia, Rangers were pelted by brass from the mini-guns of the 160th (it's even protrayed in one scene in the Blackhawk Down movie. It really happened.) They were going after targets that are on the other side (not end, but SIDE) of the street from friendlies. When you're getting hit by your air support's spent cases, you're way closer than danger close.
Some aircraft and gun pods retain the spent cases so they don't change CG as much as they shoot, which changes the way the aircraft handles. The A-10 keeps them for this reason. Retaining the weight of the empties helps offset the loss of the projectiles and propellant. There was an experimental gun pod that used the same 30mm gun, though it had fewer barrels, that was pitched back in the early 80's. The idea was to mount them on the centerline of whatever the buyer's ari force had (F-4's, F-16's, F-5's, Mirage, A-4, etc) and have an ad hoc A-10. It also retained the empties for CG reasons.