Think in terms of the survival of the government, not in terms of general social welfare. If you have a lot of pissed off poor young people, they're often fairly socially well-connected, they're more aggressive, they're able-bodied, and they can fight. If you have a lot of pissed off old people, they'll continue to be pissed off but probably won't make a whole lot of trouble. They might make a lot of trouble come election day, but in an emergency the priority is the survival of the government
now, so that you can get to the next election.
This is not an academic thought exercise, BTW - a lot of the social unrest of 2019 in Venezuela, Chile, Hong Kong, Zimbabwe, Iraq, etc. came from prices rising quickly enough that young people could not afford basic necessities.