"X-Files" has a bad rep for stringing viewers along and not resolving anything (which is another reason why Vince Gilligan made "Breaking Bad", but I digress) but if it ended after 5 seasons, pretty much everything makes sense. Then they'd occasionally make a movie to continue the story.
The problem is, the show was so successful they got renewed for seasons 6 and 7....which means they had to kind of pull stuff out of their ass to keep the story going. The arc you're referring to was actually resolved half way through season 6, with "Two Fathers". So they kept the story somewhat coherent for a bit after 5.
But then they got renewed again, for seasons 8 and 9.
Fred.