Because the major 7th to tonic is and isn't dissonant.
I think I see what you mean, but let's check. To my mind, and it's often said generally I think, a major 7th creates a "tension" that is resolved (often) in the tonic, so I guess whether we call that suspense "dissonant" is a semantic issue.