It depends on the characters, the culture they come from and their situation.

Some people are doers and thrill-seekers and need to test themselves constantly, putting themselves in dangerous situations where they risk death because they get a rush from it. Rotting away quietly is the worst thing they can think of. Some baddies will fall into this category, preferring to gamble everything to make their plans come true rather than run and hide if things seem tough.
Then you have the people who are in a situation where they feel they must fight. Against a BBEG, enemy invasion or whatever, they will risk give their lives to stop their opponents. Sure, most might prefer to die a quiet, peaceful death but it is better to die fighting the enemy than to let the enemy advance unopposed.
Sometimes you have cultures with ingrained warrior ideals of duty, honor and glory, and while many people are probably scared witless during combat, they will still fight because of their ingrained values.

Since most of the RPGs I play have a strong element of combat, most of my PCs and NPCs do not shy away from it, Exactly how happy they are to go into a situation where they know they will probably die varies, but most will at least try to think of an alternative strategy than 'rush in and die'