To be someone who seems to enjoy doing something that you consider unpleasant / Someone who habitually takes on burdensome or unpleasant tasks or unreasonable amounts of work.
Gluttony means over-indulgence and over-consumption of food, drink, or wealth items. In certain denominations of Christianity, it is considered as a cardinal sin.
Example
He’s a real glutton for punishment, taking on all that extra work without getting paid for it.
Rose agreed to organize the church fair for the third year in a row—she’s a glutton for punishment.