In the second situation he votes against it, and the second pirate gets thrown overboard.
But in the third situation, there are only three pirates left (3, 4 and 5). #3 knows that #5 will vote against it, but he only needs two votes to survive. #4 will vote for this proposal whatever he's offered, because he doesn't want to propose something that #5 might reject.
So #3 proposes that he gets all 100 gold pieces. #4 agrees, because he doesn't want to die. #5 rejects it, but it's two votes to one, and he gets nothing.
Whatever he's offered in the first proposal is better than what he would get offered in the second proposal, which is better than nothing (what he would get from the third proposal).