Neither. It’s only when you get effed for doing something helpful/nice/kind/useful and there is a lot of irony surrounding the situation that you actually notice the punishment aspect.
Most of the time, when you do something good, it actually helps and people are gracious at best, or simply neutral, which is more likely.
Got one of the ironic kicks in the teeth just a few minutes ago, from an old friend. Still reeling from that : (
^^ The only way for me to productively deal with the above situation is for me to pay it forward to someone else.