I think they had to let him go because of the $50M bonus. He just isn't worth that at this point. And they weren't going to be a contender with or without him.
But they definitely turned it into a PR disaster. Locking him out was ugly. I have tons of respect for McNair, who happens to be my all-time favorite Titan (I wasn't an Oilers fan). That said, I can't blame the organization for not wanting him to possibly get injured and having to eat his insane contract. And no one really knows how much McNair's agent turned it into a circus when there was no need for there to be one.
Lockout PR aside, I don't think the Titans screwed him. It was just business. They paid him over $50M since his rookie season, so it's not like he got the shaft. And the Ravens signed him to a big deal as well.
And hey, McNair is at the point in his career where he wants to win now, which he could never have done here with where they are now. The best thing for him, honestly, was to go to a team like the Ravens. But I have to say the fact that McNair in purple is sickening (just imagine if you guys had to see Jim Kelly in an aqua uniform).