The scenarios are always a little different. We can analyse the one that happened in this game:
Before the whacking of the D there were 11 or 12 Cs and 3 or 4 Gs (including recruiter).
For the Gs it was obvious that Ocelot (BG), king Ale (was in jail), and X (was in jail so was unable to cooperate with Ocelot/can be a G) were not the D. So unless Fred made it obvious that he's the D (i wasn't reading all the posts after my death) the chances of whacking the D were 1/8 or 1/9 or 1/10. I thought about it before the deadline on that day and i would do the same thing as Ocelot. The chances of whacking the D were still slim and he couldn't know that the Gs figured Fred out. I would protect the D once the chances would drop to like 1/6.
Now you guys are saying that BG should always protect the D. I would propably agree with this until i played in the same G team as Alen. In this game the D was long gone, and X was the BG. X knew who the jailer was (me), he didn't know that i was a recruitee though. All in all there was no reason at all for the X to protect someone else than himself. Guess what? One day Alen wanted to try and whack X.

Me and @Fred voted for the safe way and killed some C instead. After the game X confessed that one day he protected me

lol

instead of himself. Not the same day Alen wanted to whack him though afaik.

This shows that even if the D is still undercover and BG's identity is revealed there are risk takers in the G team that will consider going after a confirmed BG that by the logic will protect only himself.
If Ocelot would have died, Fred would still be undercover and let's say he would have 2-3 investigations left. He would struggle to inform the Cs about them though.
This game is extremely special cause we lynched a recruiter straight after the Crooked Cop. In such scenario the D that is alive and still running would be priceless.
For the normal C it's very important to have a clear leader in immortal BG for the rest of the game though.

All in all every decision has it's own pro and cons.
- - - Updated - - -
@king Ale