The ship had to be sacrificed and the two copilots had the choice of perhaps making sure the Engineer's ship was indeed destroyed or at least giving a comrade-in-arms the moral support he needed or may have needed.
The alternative was staying with Vickers in her luxurious private section of the ship but almost certainly starving or running out of air (maybe there was technology to synthesize air from that of the moon) before a rescue ship which, given the trillion-dollar price she mentioned, might never be sent or even if it was, not get there in time. The two men also might wonder firstly just how unpleasant being stuck with Vickers was and, perhaps pretty realistically, whether she would simply kill them to extend her own rations.
They did not have a lot of time to think about it, but I believe many people, especially in a quasi-military job, would not leave their captain to sacrifice himself.
I don't know if they wondered in that brief time whether what was being done really was necessary -- Janek actually had a pretty good idea (in fact he was the first to realize the nature of the moon -- that it was not a colony but set up to make weapons) that Shaw was indeed correct. I don't know if they expected to be thought of as heroes on Earth or if they would have cared or even if Earth would ever find out that they were spared the fate that David inflicted upon the world of the Engineer-like race. (I assume that a trillion-dollar ship kept sending info to Earth 24/7 so that the only men in history to save the entire Earth would one day be known as the heroes they were.)