There are a few things going on, but most of it, IIRC, stems from the fact that a bullet fired into the air is almost certainly not fired straight into the air, so it retains it's ballistic trajectory and spin. The spin keeps its air resistance relatively low and gravity does not work against the horizontal component of the bullets velocity. The bullet, fired slightly not straight up, will therefore hit you with whatever velocity it got from falling nose first from apogee, combined with whatever velocity sideways it started with (minus some from air resistance).
Bullets fired from a rifled barrel straight up will turn over and tumble at appogee, and their velocity on return will be only terminal velocity of the bullet tumbling through the air. Presumably this case is safe, though potentially painful.
Birdshot is safe I assume because the mass of the individual pellets are low enough so that air resistance is enough to arrest its velocity to something safe. (also the pellets aren't nearly as streamlined as bullets are anyway, though I wouldn't want to be downrange of buckshot fired into the air at an angle...)