They were two different situations.
first of all, you keep saying the teams didn't want to let their players "walk for nothing". You do realize the NFL has compensatory picks right? There is a reason teams are okay to let their free agents leave. Because if its a big free agent who signs a big contract, they will be compensated with a draft pick the following season. That's why teams don't tag and trade their players every year, because most of the time its stupid and pointless.
Cassel was tagged because the Patriots knew they could get more for him by trading him than they would get from receiving a compensatory pick. Since Cassel was quarterback who played well the season prior, the Patriots were able to get a very early 2nd round pick for him. If they would've let him walk, they likely would've received a 3rd round comp pick the next season instead. But since QBs are always in high demand, they were able to get more for him.
With Landry it is different. If the Dolphins would've let Landry walk, next season they very likely would've received a 3rd round compensatory pick for him. Instead, the Dolphins decided to tag and trade him. This is different from the Cassel situation because very few teams, if any, are willing to give up a high draft pick for a WR who they are going to have to immediately pay top dollar for. A WR does not carry a franchise like a QB does. This is why it was stupid that the Dolphins tagged Landry with seemingly only intentions to trade him. They were never going to get more than a 3rd round pick for him. The only reason the Dolphins had any reason to tag and trade Landry is because they didn't want to wait a year to receive their comp pick. But that has proved to be a costly mistake because they are having trouble trading him and they have absolutely no cap to keep him.
Now I assume you struggled to comprehend my post because you were unaware that teams receive compensatory picks, or you wouldn't have said "It's not totally stupid for Miami, they're getting a pick for a player who destined to leave. Even if it's for a 6th round pick at least they get something in return".
Now you probably see why it would be an awful outcome for Miami if they were only to receive a 6th round pick for him. And why it was a stupid idea to tag him with no cap space.