I believe it’s to make atonement, which is more closely related to punishment than to helping others. There is a component of both present in atonement, however. Note that you will not see many people punishming themselves in ways unrelated to their crime (hair shirts, self-flagellation, etc) outside of religious communities that believe the true problem of wrongdoing is distancing oneself from a deity rather than harming others. But you will also not see many people atoning for wrongdoing by finding the cheapest possible way to create sufficient good to counterbalance the harm they’ve committed. Rather, most people try to find hard/painful ways to do good. Often this involves nonfinancial contributions.
I believe it’s to make atonement, which is more closely related to punishment than to helping others. There is a component of both present in atonement, however. Note that you will not see many people punishming themselves in ways unrelated to their crime (hair shirts, self-flagellation, etc) outside of religious communities that believe the true problem of wrongdoing is distancing oneself from a deity rather than harming others. But you will also not see many people atoning for wrongdoing by finding the cheapest possible way to create sufficient good to counterbalance the harm they’ve committed. Rather, most people try to find hard/painful ways to do good. Often this involves nonfinancial contributions.