FLAC is the audiophile's handshake: CD-perfect sound at roughly half the shelf space. It was born in 2001, Josh Coalson; now kept by the open Xiph.Org Foundation, and its real weak spot is fitting in pockets: lossless is still large: and charming Apple's own apps.
M4A is AAC in Apple's favorite outfit: the audio-only MP4 your iPhone speaks natively. An MP4 container holding only audio: usually AAC, occasionally Apple's lossless ALAC. That makes it the right destination when what you need is sounding great anywhere in the Apple ecosystem.