The audio inside an MP4 is usually AAC already — the same codec M4A uses. Converting MP4 to M4A therefore keeps the audio in its native family instead of translating it into MP3, which means a smaller file at equivalent quality and a format iPhone, iPad, Mac and the Music app treat as their own.
Pick this over MP3 when everything that has to play the file is reasonably modern. Pick MP3 when a car stereo or an older device is involved.
M4A vs MP3 for extracted audio
AAC was designed to succeed MP3 and does the job better at the same bitrate, most audibly below about 160 kbps. For a video soundtrack that was AAC to begin with, M4A is also the more natural destination — you're re-encoding within the same codec family rather than across two very different ones.
The trade-off is purely compatibility. MP3 plays on everything ever built; M4A plays on essentially everything built this century. iTunes, Music, Podcasts and Apple Books all handle M4A natively, and so does Android.