This episode - a Walter Skinner-centric one - sprang from David Duchovny's request that he and Gillian Anderson play a lesser role in order to have some time off. Being the 21st episode in the season, most of the cast and crew were exhausted at this stage.
The trivia items below may give away important plot points.
When Skinner talks about his past in Vietnam, he says he was "no choir boy; (he) inhaled." This is a reference to Bill Clinton's answer, when asked, that he tried marijuana once in college, but he swore he didn't inhale.