I read this short story in a collection somewhere in the late 80s or early 90s, but I think it may have been written earlier.
In the story, a fairly young guy ends up in a strange community on a different planet.
The community is very peaceful and seem on the face of things healthy and pretty ideal, although there seem to be many people dying in accidents.
He meets a young woman whom he likes and decides to stop trying to find a way home and instead to work to make everyone's lives better and to stay with them.
He does a lot of good, and gets into a relationship with the girl and I think they get married.
Eventually, with all the good work he's been doing, people start talking about honouring him with some kind of ceremony.
It turns out (although the guy never learns about this) that in this society dieing a violent death is considered the greatest reward possible, and the community has to vote to allow someone to do so. Then the person being is killed in some violent/painful way and if they are highly respected or achieve something amazing, they are ceremonially tortured to death. A lot of people who aren't good enough for this honour commit suicide by faking an accidental death, because overt suicide is taboo.
The woman's father has been working on his own accident for a while, which involves "accidentally" falling in a river and drowning.
Just before the ceremony to honour the guy, he sees the other man in the river drowning and apparently yelling for help, and jumps in and saves him.
Everyone is angry at him for stealing the old man's death and he doesn't understand what's going on.
He gets exiled, and the woman goes with him. The story ends with her thinking how someday he'll redeem himself for stealing her father's death and then she will be able to give him this greatest gift - a violent death.