There can be various reasons behind locking threads in forums. Sometimes, when the OP (who created the thread) gets the desired answer or feels that the discussion is complete, he locks the thread, so that unnecessary comments or spam are not posted later. In some cases, moderators can also lock threads to stop rule violations, duplicate topics, and off-topic discussions. Of course, not all threads are locked. Topics that may require new information, updates, or constructive discussion in the future are usually left open. So if you see a thread locked, it's not necessarily for a bad reason, but sometimes it's just a way to end the discussion in a respectful manner.
You forgot one more reason.
If a thread was locked by the OP, there is another reason such as scam accusation and the OP does not want to handle scam accusations from community. He can lock it, and create a new thread, this time will be self-moderated. Or he can simply lock that thread and make a scam exit.
But if threads locked by moderators, above reasons are very possible.