The weight loss mechanism largely just comes from suppressing appetite though, so it still lines up with the penance for sin narrative. It’s not that different from wearing a hair-shirt and whipping yourself if you find yourself having lustful thoughts. Only instead of a whip you just feel kind of uncomfortable and nauseous if you eat too much.