M4A is AAC in Apple's favorite outfit: the audio-only MP4 your iPhone speaks natively. It was born in 2003, popularized by Apple's iTunes Store, and its real weak spot is older Windows software and stubborn car stereos that expect a .mp3.
AVI is the veteran of desktop video: dependable in 1995, cranky about everything invented since. Audio Video Interleave: an early container that predates streaming and most codecs you'd use today. That makes it the right destination when what you need is opening old archives and humoring legacy Windows tools.