I don't know how big lala was, but Apple has maybe the biggest collection of correctly tagged collection of audio, along with user's listening habits through buys, and other stuff (soon playlists, etc...). This can certainly help mitigating this problem.
What's really impressive to me is that they manage to negotiate a deal with the majors to do this.
There are free and open implementations of the same thing as well. It hashes the track locations and lengths to create a 'fingerprint' for each CD. Then it looks up the hash in the database.
Wouldn't work for individual songs, this is where algorithms like the ones Shazam and LaLa use come into play since they'll actually look at the audio file. Getting this correct is pretty important or you'll end up with the wrong songs.
Pirates can actually try to game the algorithm and rip albums in bad quality to minimize file size but good enough for Apple to recognize the songs as such.
Yeah, I realize that. I guess I assumed it would be obvious since CDDB works from track spacing and lengths when there's no such thing with MP3 files. For the same reason, iTunes can't magically tag arbitrary MP3 files.
What's really impressive to me is that they manage to negotiate a deal with the majors to do this.