Does Guilt serve a purpose?

Hi coaches, I have a client who feels guilt for some past actions. I know that regret isn’t useful, I believe that. But I’m trying to figure out if guilt serves. If we’ve done something that hurts others, do we want to feel okay about it? I’m feeling uncomfortable with the idea that guilt is optional. Can someone commit a crime knowing they can feel completely ok with it on the other side? Does guilt serve a purpose in showing us where we may have amends to make?