Not a whole lot of sorting or anything involved although there's terminal handling which can get complex in large centers.
Has a lot to do with late night flights and "locations" ~ passenger air carriers have been pushing mail outta' their holds over the years as they turn themselves into Greyhound buses with wings (and oh those stankmeister toilets, wow!).
My first job at USPS was involved in reviewing airlift opportunities ~ they'd only recently decided to transport First-Class Mail by air everywhere possible. Rates were pretty decent too (for hauling mail). We were just then experimenting withcontainerizing FCM letters so they could be directly dispatched from mail processing operations downtown directly to specific flights at nearby airports. Other guys were working on a bidding system ~ finally implemented ~ that gave each airline a shot at bidding to carry any particular segment of mail.
This stuff was highly dependent on the latest and greatest in roll-on/roll-off technology as well as computers.
Lots of fun hanging around airport ops late at night, riding around in little trucks on the aprons.
A large number of the planes are filled with mail heading to the daysort - it's not just a space available deal. These are contracted volumes and are a big part of FedEx's revenue stream.