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.
WAV is audio with nothing taken away: every sample intact, every megabyte accounted for. Raw PCM samples in a RIFF wrapper. No compression of any kind. That makes it the right destination when what you need is recording, editing and mastering, where every last bit matters.