Sometimes you have to make a decision based on your principles. I find that when you're in a situation like this, it usually really sucks.
You've done something wrong. Not just oops-I-ran-a-red-light-wrong. More like I-did-something-unethical-wrong. But you're the only one that knows. Do you go on with your life and not tell anyone, or do you confess and face consequences?
Some people might say "It depends on what you did." Some might say that clearly the right thing to do is confess. A few would go the "tell no one" route. But what would you actually do? As someone who's been in this situation, I can tell you that it's very tempting to not tell anyone, and then just never do it again. And as someone who has done [what I think is] the right thing and 'fessed up, I can tell you that it really sucks. It's not even as relieving as everyone thinks it is.
You have a friend who takes you for granted. You help them out with everything from emotional support, to giving them rides, to lending them money. But you get nothing in return. Do you continue to do what you're doing because they're your friend, or do you tell them that they need to start doing things for themselves?
A friend of yours says they can't remain friends with you if you continue to talk to someone that they don't like. Easy enough, right? Drop the guy/gal who's giving you the childish ultimatum. But what if that person is your best friend? What if it's someone you love?
I think the thing about making decisions based on principle is that you have to really know what your principles are. You have to ask yourself "How far am I willing to go for ___?" or "How much am I willing to give up for ___?" or "When is ___ the right/wrong thing to do?"
So I guess if someone who calls himself/herself my friend is taking me for granted, then I'll see if he/she sticks around when I stop doing him/her favors. And I guess I'll continue to tell people the truth, even if it means condemning myself. And if someone I love can't handle me being friends with someone they dislike, then I guess I'll leave it up to them to decide if it's worth losing me over.