We've had arguments about whether or not Jane's character had to kill the four people he did, but regardless of his logic, it sure makes for an ending you're not likely to forget anytime soon.
I think it made sense given the situation they were in. Analyzing it logically after the shock had worn off, I realized the sensible thing to do would have been to hold off on the murder/suicide-minus-suicide until there was an immediate threat (there's a monster right there
about to kill them, say), and otherwise sit and wait just in case some kind of rescue comes. That way, they'd maximize their (admittedly slim) chances.
But given what they'd been through and what they'd seen, I can see how they would think immediate death would be the reasonable response. After watching dozens of people die in the most horrible of ways, I can't imagine many in their position would want to take the chance. So I guess what Jane did was not logical, but it was humane, if you catch my meaning.