When the original Guide to PHL was created (legacy US), we included this as primer for flight numbers:
West Side US Airways 0001 - 0699
East Side TATL 0700 - 0799 Also some domestic thru flights
East Side Us Airways 0800 - 2199 Including Shuttle flights
PSA Airlines 2200 - 2599
Mesa Airlines 2600 - 2999
Chautauqua Airlines 3000 - 3099
Republic Airlines 3100 - 3499
Trans States Airlines 3500 - 3550
Air Wisconsin 3551 - 4099
Piedmont Airlines 4100 - 4649
Colgan Air 4650 - 4849
So part of it was legacy HP, part of it was legacy US. It certainly doesn't go into the logistics of wildly different flight numbers like your ORD-MSP example, but I think as different airlines are absorbed into the "main" carrier, you still see remnants of those old flight numbers.