Why do we have guilt?

Why do we have guilt?
Sri Sri Ravi Shankar: It is good to have a little bit of guilt, not too much. That little guilt can prevent you from committing the same mistake again. What is guilt? Intellectually you know an action to be bad, but you have a temptation to do that action because it promises you some pleasure or joy. Your hearts wants something, but the mind says, 'It is wrong'. Between the mind and the heart, the heart wins most of the time and this is when guilt comes up in you. And little bit of that guilt can prevent you from derailing further, but it should not be too much.