I would bet a finger that the timeline went something like this at the GOP HQ.
1: Alright, everyone. This tape is going to surface soon. Remember: we all pull our endorsements on him at once and DEMAND he step down. He'll probably be a shitshow in the next debate, all apologetic and pathetic. Then we replace him.
2: What the. Oh shit he's doing good.
2.5: Oh shit. He's doing REAL good.
3: He's not stepping down, is he. And also, now he's attacking us, SHIT.
Trump was looking like he was either going to A) Win, but be the winner who was going to humbly build bridges, or B) Lose, but lose gracefully.
But no, they had to get the insurance in, had to go for the October Surprise stab in the back to try and ruin him. Which just pissed him off, animated him further, and now he's pulling out all the stops and it's looking like a Lion in the Streets situation.
They really are the stupid party. All that's left is for hacked emails to come out showing they colluded with the democrats on releasing this tape, which is already looking obvious due to the Bush connection.