I don't think we have an obligation to legislate everyone's health, but I do think it's a higher ask when we're talking about explicitly subsidizing bad choices for people most vulnerable to making them. I don't think we should subsidize cigarettes for poor people, either, even if that means they are still accessible to rich people in a way that's perceived as unfair.
And besides: people of high incomes already disproportionately avoid these highly processed foods, so it's not like we're hoarding the wealthy pleasures of Mountain Dew and Twinkies just for them.
If there is an objection that giving cash is equivalent to subsidizing Twinkies, I would push back. Child tax credits are in many ways economically equivalent to cash transfers, but we don't usually see arguments that this is a subsidy for Mountain Dew.