If I'm not mistaken, administrators and moderators are allowed to lock a thread for whatever reason, as they are trusted with their own judgement. Admins, of course, can do anything to/with/for the site as they please, and moderators have earned their position among the staff. If a moderator is not fit for the job, an administrator will see this and demote them. So when a thread gets locked, you might think it's just because the moderator/administrator has a disagreement with you, but really it's that he/she is looking out for the community - trying to stop fighting, severe arguements, spamming, etc.
That's all there is to it...