But food is a basic necessity, therefore it doesn't matter if you spend 1000$ on coffee or pizza or whatever.
A 1000$ phone is NOT a necessity, it's a luxury. You could perfectly live with a 500$ phone, which I still think is a lot.
You need to differentiate between something that is really vital, like food, from something that is not, like a premium phone. There is no need for a 1000$ phone. You've got phones for 200$ with FHD screens, quick charge, fingerprint scanner, USB-C, 3GB RAM, microSD, good battery, good enough camera, etc.
Apple probably puts the price of the iPhone 500/600$ more expensive that it cost them to build, and that is infuriating.
Its a necessity yet most people don't just buy whole bread and peanut butter and live off that.
That's just about the cheapest way to live calory/nutrient wise.
So, basically you built a straw man argument.
Even above that minimum level,
most people buy much of their food in far from financially optimal ways for just survival : fast-food, etc.
Most of the way people people eat food is not about survival at all.
Survival means spending maybe $3000-$4000 a year on food a year per person.
For people spending that kind of money, no smart phone on earth makes sense.
For everyone that's far removed from that limit, they decide how much importance they put on spending money on food or something else.
They may decide they prefer a fantastic phone and otherwise get by with the minimum of everything else, or more likely they eat in a very sub-optimal ad-hoc way and wind up have not much money to spend on anything but a not so great phone.
In Apple's target market, basic needs lets face it have been met. Those people mostly are living modern connected lives and for those people having the tool do so is a necessity.
The necessity is not level 1 (eating, breathing, shelter), but one higher in the maslow pyramid depending on what that person's live actually is.
We're not just eating-sleeping-pooping machines, necessity in most cases, in north America, what we require to live full lives goes beyond basic survival.
The answer would undoubtably be difference in war torn Congo or other horrible places; but that's like a non sequitur. Context does matter.