Sugar is a luxury when it comes to survival.
Salt is essential. It’s a necessity.
Suppose you have salt already. Acquiring sugar is extremely beneficial, it reduces your caloric needs so you spend less effort getting hard to get things.
Even when I get everything I want I still consume a lot of sugar.