Lets just he was dreaming.
First, I really enjoyed the lively banter between Castle and Beckett when he professed his feelings...I love you Kate, but you already knew that...you betrayed me Castle...I did it to save you Kate...I don't need you to save me dumbshit - don't you know anything about women? And then things a took a different twist when he told her that he couldn't deal with the situation of her being so careless with her life, and told her to have a nice life.
Our story take yet another twist when she is hanging by her finger tips and in need of being saved; she reaches out for Castle, only to have a fellow coworker pull her from up from the ledge. Of course, while she is being suspended and then resigns her position in anger and frustration...Castle completely ignores her calls. He is done fighting the battle to win Beckett's love and affection and resigns himself to that fact. It was at this point that I though the show would end and would pick-up next year with Castle and Beckett both leading separate lives outside of law enforcement...yet, being drawn back to the job and people they love. In comes the wrench...Beckett shows up on Castle's door for a lap dance and to return his love and erection...er, I mean affection.
Yes, the thought of Castle daydreaming during his daughter's speech did cross my mind. In fact, I feel there is at least at 50% chance this dalliance only took place is his mind. I am having a hard time believing that Beckett would forgive Castle so quickly after she felt betrayed coupled with the fact he did not save her on the roof. In fact, from the little I know about women...I would think she would knock down to the door screaming at Castle, "Why didn't you save me? Didn't you know when a woman says she doesn't want to be saved, it only means she does want to be saved and that you're never to leave her alone hanging from a ledge?"
Anyway, the only part that was incredible (to me) is that the shooter did not kill Beckett when he had the opportunity...only to close with how much he looked forward to killing her the next time they met. WTF?
Regardless, I like this finale better than last season...if, like with any of my dealings with women, I can figure out what just happened.