The BAU stalker, or "The Replicator," first appeared in the Season 8 premiere.
What the audience knew by the end of Episode 1 was only that someone creepy was taking photos of the team and developing them in the always-creepy light of a darkroom.
Showrunner Erica Messer told BuzzFeed that the writers of the show have known a lot more than that since the start of the arc.
Jim Clemente, a former FBI profiler and a writer-producer on the show, explained the writers' room–genesis of the killer.
As Messer started to write the second episode of the two-part finale, Ticona Joy, the Criminal Minds researcher, researched the show itself to make sure that everything established earlier about the Replicator paid off.
Joy's research helped make sure that nothing got left out. Remember this stolen glass?
Messer said producers on the show wanted to cast someone with international recognizability as the murderous FBI agent; they cast Mark Hamill.
Rick Dunkle, the writer-producer who wrote the "Brothers Hotchner" portion of the finale, says they weren't trying to pull any punches at the end of the season.
Part of that payoff was having the antagonist die at the end of the episode.
Messer said, "The challenge is always, we catch bad guys in 43 minutes, so how do we stretch it out over a whole season?"