Apple uses the actual encoding/decoding software from the people who engineered the mp3 format:
http://www.fraunhofer.de/fhg/EN/index.jsp
To say LAME encoder is better, is, well a matter of opinion. I found that LAME doesn't do well at all with choir/voices with orchestra, etc. Where the Fraunhofer encoder does excellent with voices and orch situations. (I have a fraunhafer encoder program for windows.) And works better at lower bitrates that LAME.
However, LAME is better at other aspects, such as low pass/high pass filters; and their VBR encoding is excellent.
This is an endless debate, so I don't know if there is a right answer.
Also, for legal reasons, it is somewhat shaddy from a legal standpoint to include LAME in your software. That is why Audacity, and others don't include it directly in their software. [Also for reasons of the LGPL.) And LAME avoids getting sued b/c technically they 'ain't an mp3 encoder.' I'm not sure apple would want to gamble and use LAME with questionable legality in such a huge project, Logic Pro. So they license from the actual mp3 creators.
See #6 at the bottom:
http://lame.sourceforge.net/tech-FAQ.txt
And a side related note: The Fraunhofer folks developed the AAC format, also. Not Dolby, and not Apple, as most people say. They intended it to be (and it is) a better form of audio compression. A successor to the mp3. Though due to the popularity of the mp3, AAC has not taken off.
http://www.iis.fraunhofer.de/amm/techinf/aac/index.html