If you named the files correctly, and the WMP database contains a unique listing of that same name, then that would be how it recognized it.
There's no way it would be doing wave-form checking since it would have to upload the entire song to the server, then run a check against all songs listed which is not only a computational nightmare, but most likely a legal one too.
[EDIT]
Personally, I've banned WMP from doing pretty much anything on my computer except play music and videos.
The only time I ever open it is when WinAMP can't play a file, or if I want to play two things at once, and that's only rare.
Why would I want MS to know what I'm listening to?
[/EDIT]