Yeah, that was one of the least satisfying endings I've ever had the displeasure of reading.
All of the pieces were there in the story to justify it happening, but nothing in the writing/tone suggested that it was going to happen. I guess that highlights the overall issue of the story constantly flip-flopping on it's tone.
Aside from the ending feeling very out-of-nowhere, the other issue is that there's no real closure. We see literally nothing of how the ending affects the other characters in the story, which would have gone a long way towards making that ending bearable, even with how abrupt it was.