I don't have time to go into this in-depth, so here's a quick response to you (battle7), as well as some commentary on the others.
MPEG-2 vs MPEG-4, For Perspective
MPEG-2 (and MPEG-1, sometimes) is the codec/format used for creating DVD-Video. Even Blu-ray uses MPEG-2, as well as H.264 (aka AVC aka MPEG-4 Pt10).
Divx is an MPEG-4 format, and Xvid is the open-source version of Divx (originally a fork on the same basic code).
Both MPEG-2 and Xvid are compression.
As we well know, you can screw up MPEG-2 and make bad looking DVDs. Same for Xvid. Same for any video format. Older collectors remember all the crapped-up VHS tapes that used to float around the collector community.
Now MPEG-2 is an old format, from the 1990s. It's matured. By the time consumers could make DVDs at home (2001) -- especially you late adopters (2003+) -- the tools to both create and play discs were fairly decent, being based on stripped-down pro tools.
Xvid was only developed in 2001, and didn't really "catch on" for a good 3-4 years. But even when it did become more popular, the tools to both create and play Xvid was very awkward. To further add problems, many of the people attempting to use them had zero video knowledge. They would butcher video more than anything else. This is what led to the creation of a number of "groups", like EZTV, for the TV recording/share scene. The groups would ideally try to watchdog crap releases. (Although I'd note that some groups still make crap, such as Cartoon Palace {C_P}.)
MPEG-2 is both a format/codec and a container. MPEG-4 requires a container file to exist in playable format. That can be AVI, MKV, MP4 or others.
More On MPEG-4 / Xvid
MPEG-4 for Divx/Xvid needs to be progressive for the intended players commonly used, not interlaced, and that's always been the primary issue. Most people would screw up that process ({C_P} still screws it up). Most primetime broadcasted video is created progressive in HD, and then interlacing is added. It can be removed with the process known as "IVTC" (inverse telecining).
The benefit of MPEG-4 variants over MPEG-2 is how the blocks are allocated. MPEG-2 is a checkerboard pattern -- something we've all seen on badly-made over-compressed DVDs -- while MPEG-4 variants can use varying shapes blocks (i.e., not a strict chekcboard). This allows for more accuracy in encoding. It's one reason H.264 has become the next-generation format of choice. The MPEG-4 codecs also have built-in de-noise options (de-block), unlike MPEG-2, which helps in quality playback.
From 2003-2005, you'd find a lot of bad episodes in a season worth of Xvid downloaded shows. Starting around 2006, more of the Xvids found online (torrents, by this time) were okay. Many still were not. By 2007-2008, you started to see less problems. And even when a problem did happen, the bad episode was "propered" (replaced with fixed/better quality version) by the group. In 2009-2010, you rarely see bad episodes. But again, this ONLY applies to primetime network TV shows. Anything old, anything on obscure channels (Cartoon Network would be considered "obscure"), it's probably not going to look good.
Future of Xvid
With companies like Hulu using H.264, from studio-supplied source videos, and as broadband speeds increase, there may be a point in time where Xvid/torrents aren't needed anymore. Fans won't even be needed anymore, as the studios will be doing their jobs (releasing materials for the public enjoyment).
As we've already seen from traffic on this site, less people are searching for old TV shows on VHS or DVDs, instead turning to services like Hulu or Youtube to locate their programs. Now granted, the current state of those services offers a LOT of subpar crap. Some of it is from video know-nothing fans, others are from rush-rush low-grade over-compressed studio jobs. What we do here, helping each other learn to create and locate shows on physical media, is still the high quality way to go.
I'm not really a supporter of Xvid, when it comes to standard definition TV or re-runs. The tools just don't lend themselves to quality like a normal MPEG-2 recording. Those Xvid tools are really geared towards HD feeds and newbies (people who don't understand video).
AVI Old?
To say AVI is "old" and needs to be replaced is like saying "round tires" are old, and we need to move on to hover cars. It's a proven technology that really doesn't age. And even when something other than AVI (or tired cars) is invented, you'll still find the "old" tech in use for many more years.
Example of non-DVD Video: Macross Frontier
The Macross Frontier episodes I have are actually not XVID files, they're just listed with all the other "data" formats -- videos I have as files, and not DVD-Video or Blu-ray videos. These are actually HD recordings, 1280x720 (720p), H.264 with the x264 encoder, in MKV containers. Anybody that would call these files low quality would have to be deaf and blind. It's 25 separate files of about 350MB each, and would take 3 DVD-R or DVD+R if I put it on discs (with the last disc mostly empty). I use the KM Player to watch them, as it works better than VLC for these particular files on my older single-core CPU where I watch the episodes. Good series, thought I've only had time to watch 1-2 eps to date.
I would add that Matroska (MKV) won't catch on. It's already dying out. MP4 containers are really the container of choice, because it can be dual-purposed as a web streaming container via Flash or HTML5. While MKV might technically be a better container, the web use of MP4 will kill it in the long run.
Screen cap (downsized to 800px wide) from episode #1 re-telling of original Macross:
Related (But Unrelated) Trivia
Want even more trivia? Divx isn't used by consumers because it costs money, while Xvid is free -- and both are essentially the same codec. Arguably, Xvid has more tweaks for the community of users, because they can alter the software to do what they want, being open-source. Now then, MainConcept is the modern player in MPEG-2 and H.264 software technology. Any number of DVDs, Blu-rays and TV broadcasts you watch were possibly made with those software encoders. (Anything not made with MC was probably created through hard encoding. Maybe some Quicktime Mac projects, some Grass Valley projects.) Adobe, Sony, Corel/Ulead and several other major players use the MainConcept SDK for their encoding. Divx bought MainConcept a month or so ago.
Well... that turned out a little more in depth than I had intended.