Why do we write a "threat to validity" section?
As usual, the true (but not very useful) answer is: it depends. I typically come across that section when the article describes an experiment. Experiments typically involve quite an abstraction from the real world, which is why they can keep so much under control. However, this also means that one could question whether what one found in the abstract environment in the lab also applies to the real world. This is called external validity. This is what is discussed in such a section.