this format is free, which apparently is one of the reasons for its popularity. The used codecs supports variable bit rates (as a default), and .ogg files usually play back easily on all platforms. All things being equal, the sound quality exceeds that of mp3 somewhat.
this is a lossless-format (and encoding algorithm) for Apple platforms. M4A is widely used in iPod players and as a component in QuickTime media-players. The m4a codecs decoder is found in open sources - this allows third party users to open files in that format.