Various reasons, usually down to the Moderators/supermods/admins discretion. It also depends on the particular forum as some are more strict than others.
Basic reasons would be them being against forum rules (excessive swearing, explicit language/images, outright flaming, again this depends on the forum), or threads just being used to up ones post count via spam.
Also, sometimes someone asks a question (like this thread) and once the question has been answered the thread can degenerate into a spamfest and go widely off topic, thus it'll be closed (thought I wouldn't worry too much about this particular thread).
But it really just depends on where you are and what the mod/supermod/admin is like.