In women's restrooms, one can decide to sit on the seat or to squat several inches above it, preventing leg-to-seat contact at the expense of physical exertion. Sitting is more comfortable, and would be the preferred option if you knew the seat was clean. But the fear of descending onto hidden droplets, or onto a wiped (but not cleaned) seat, makes squatting the safer choice. Squatting, however, will likely result in an unclean seat for the next person.
This is not quite the prisoner's dilemma, although it shares some of its properties. One difference, for example, is that there isn't a higher payoff to you for defecting (squatting) while your opponent sits, compared with her also squatting.
It is not quite the tragedy of the commons, because again there is no benefit to be reaped by "exploiting" the shared resource (perhaps you could argue the benefit is "peace of mind", although that might be a stretch?).
Instead, everyone would be better off cooperating. But the fear that just a single person has defected (and knowing that everyone else also feels this fear) makes squatting a popular choice.
Is there a term for situations such as this?