"V'haya b'or besaro l'nega tzara'as..." Chazal tell us that as a general rule that the word "v'haya" portends something good happening. What's so good about having a nega tzara'as? (I haven't done a survey of all the places it comes up, but my off the cuff impression is that the Ohr haChaim frequently addresses how pesukim that seem to be an exception do in fact fit the rule. Interestingly, here he is silent about the issue.)
The answer in two words, says the Alshich, is "b'or besaro." Sometimes the rot you see on the surface is indicative of some deep rooted problem. Here, the Torah says that when a Jew gets tzara'as, which comes because of cheit, the sin is literally only skin deep. At his/her core, a Jew is always unspoiled. Cheit is just mikra, not b'etzem, to borrow the Maharal's formulation. It's like when you have to have your car brought to the mechanic after a collision and you think it's a goses and it's all over. When you hear that it just needs some body work to get out the dents you almost feel like saying "Baruch Hashem -- that's great!" because it means everything under the hood is OK and it will keep running. Tzara'as is a sign that repairs are needed, but there is a note of simcha there because under the hood we are all OK.
The sin that is the cause of tzara'as is lashon ha'ra, but nowhere does the Torah say not to speak lashon ha'ra. Instead, the Torah tells us to remember what Hashem did to Miriam when she spoke against Moshe. 1) If the point is to prohibit us from lashon ha'ra, then why not say so directly? 2) Hashem didn't do anything to Miriam -- Hashem doesn't deliberately choose to bring harm on people. People suffer because they bring punishment upon themselves by their behavior. If you put your hand on a hot stove, you get burned, but it's not like the stove decided to do anything -- you brought the burn upon yourself. Why does the Torah tell us to remember what Hashem did to Miriam instead of telling us to remember what Miriam did?
Sefas Emes (5638) these questions with the same yesod we learned from the Alshich. The point of "zachor eis asher asah Hashem Elokecha l'Miriam..." is not to warn us against speaking lashon ha'ra -- there are other sources for that. The pasuk is not an issur and not a threat of punishment; the pasuk is a gift of great news. An analogy: imagine someone who lives on the worst fast food out there -- the greasy, fatty, salty stuff three meals a day every day. You can serve up the most unhealthy meal and that person can eat it without a problem. If someone else who is used to eating healthy, who eats only good food prepared well, is served the same meal, they will vomit it right up. That's not a sign of weakness -- aderaba, it's a sign that their body is healthy. The whole world is busy munching on lashon ha'ra, the worst fast food for the neshoma, all day every day. Hashem here is telling us that if we try that same diet, we are going to break out in tzara'as. He made it -- it's not natually that way -- so that we can't absorb that food. It's because our neshomos are pure and healthy that we react that way.
P.S. My wife had an interesting original idea on the parsha here.