Sometimes apologies fix the problem. Sometimes all that’s needed to make things ok is to acknowledge that you did something wrong. For instance, if you accidentally bump into someone, saying “sorry” clarifies that you didn’t do it on purpose and don’t intend to hurt them. That’s usually enough in that kind of situation.
When someone apologizes in a way that fixes the problem, it’s usually good to say something like “it’s ok”. Because now that they’ve apologized, it *is* ok.
Sincere apologies aren’t always enough to make everything ok. Sometimes mistakes hurt people in ways that persist even after an apology. They can still matter. Fixing part of a problem is better than doing nothing.
If someone apologizes to you in a way that’s real but doesn’t erase the problem, you may not want to say “it’s ok” (because it still isn’t). One thing you can say instead is “Thank you for apologizing”. Thanking someone for apologizing acknowledges and accepts the apology without pretending that everything is fixed. This can create space for the problem to actually get solved.
Short version: When sincere apologies don’t fix everything, ‘thank you for apologizing’ can be a better thing to say than ‘it’s ok’.