If they’ve been planning this since the election, why wait to file in PA? If Stein had filed by 11/21, she would have been able to ask for a recount. Now, she has to get the courts to overturn the results, a much higher bar to overcome.
The likely answer is they haven’t been planning this since the election.
Candidates have no standing to petition county boards for recounts, individual citizens would have to do that in every county. The only kind of a recount that a candidate has standing to pursue is a statewide recount, and unless that is a mandatory threshold recount (<0.5% in PA) it must always be ordered by a court.
They have been planning it at least since the moment the claim of “Russian hackers” was made... in other words, prior to the election.
Their internal polling was bad enough to cancel the fireworks days before the election; chances are it was bad enough before then and the Dems were already in salvae mode while everyone was distracted by Wikileaks.