It doesn't. You're limited to 25,000 of your own (i.e. not purchased from iTunes) songs.
It does if it can't find matches for your tracks. This will happen generally with obscure tracks or live recordings, but sometimes it just fails to match things that are clearly in the iTunes store too.