It's unclear what causes this to happen. It could be caches being cleared or iTunes connectivity issue.
I get this problem ocassionaly but relinking your computer should not do en entire scan process. When I've had to do it the process is usually pretty quick maybe 10mins at the most.
How large is your library, mine has about 12000 tracks.
25,431 tracks (well over 3000 of which were bought from the iTunes store so they should not count against my limit). The problem has happend half a dozen times or more on my Windows 7 machine and and equal number of times on my 27" iMac at home (on both Lion and now Mountain Lion and across multiple versions of iTunes).
And no it shouldn;t take long to scan the library and realize I already have copies in the cloud but it sometimes takes 30 minutes to an hour. last week I have a new twist when the scan hung and locked me out of my iTunes library file.
With your large library you might see some long processing time while re-linking your library after having to log out and back in.
Unfortunately stability and speed are something that could be much improved on the iTunes Match service. Try to keep an eye on when it happens on your Mac and maybe check the Console application to see if there is some error that is causing this to happen repeatedly.