Agreed, Apple actually uses really very decent low-noise low-distortion DAC's. I can tell you I run right off the headphone jack of my iPad ALL THE TIME at live events, concerts, DJing, etc. No complaints about the sound quality on my behalf. Sometimes through a DI box into an XLR for a long run, or a pair of DI boxes to keep it stereo.
AAC was never terrible... Apple's implementation was. Apple screwed up AAC really badly when they first started using it with a really bad codec. And the sampling rate of most MP3's out there is just fine - 44.1KHz, which makes for 22.05KHz as the highest recordable frequency. 48KHz is often used in studio work, yes, but CD's are 44.1 and telling the difference is VERY difficult and only possible with some types of content. The bitrates even often aren't too bad... The codecs used are sometimes terrible, much of the MP3 content on pirated networks has been re-encoded multiple times, etc.
Another issue is bad joint stereo and VBR implementations. Joint stereo is a method to record a higher bitrate center, and lower bitrate differences between channels. The idea being most of the main vocals, etc - and sometimes the whole track - is all centered (mono mix). During primarily mono portions, a 128kbps joint stereo MP3 would be ONE 128kbps channel instead of two identical 64kbps channels. That's a DARN GOOD thing. Joint stereo got a bad rap though? Why - because the encoders didn't live up to the promise of joint stereo. It often sucked, really bad. Rather than sounding BETTER, joint stereo encodings sounded worse and sometimes lost some of their stereo separation as well.
Same with VBR. Good idea, turn down the bitrate during silence, turn it up during the most complex parts, keep the average lower. The problem with this was both BAD INTELLIGENCE - early codecs that would turn it down when it needed more bits, and also users setting too low of average.
Good MP3 (VBR or CBR with a good codec, and high enough bitrate) will sound darn good. Good AAC can beat good MP3 at the same bitrate for most content, but honestly the encoder used matters as much as the format...