My kids are preschoolers (one is shortly starting school)
What do you say to them when they say, but 'I don't want sandwiches first, I just want cake'
You dont really have to say much at all - in those situations, the best discussion or negotiation, the better. A simple "no, we are having sandwiches" usually suffices - if they ask why, you could give a bit of basic nutritional reason if you wanted to - "because you want to grow big and strong" or if they are older, "because you'll get hungry later if you just have cake, trust me, you'll crash and burn!" or some such.
"(and you don't want them to just have cake either - you want them to eat something more nutricious)"
If you dont want them to have cake at all, for some reason, then dont have it in, hide it, or even better, scoff it yourself 
If you do have cupboards full of crisps, biscuits, cakes, chocolate and sweets (I'm sure you dont but you know) then of course this kind of approach might fall on its ass.
Having said that, my kids have never actually asked for cake for lunch, they have said they want cake though - usually because they can see it somewhere. The last time it happened was when we were having friends over at 2:30 for tea and cake and playing. So I said "we are having cake later, when our friends get here" and we sat and had lunch. After lunch, my son asked again - and I said "when your friends get here!" and that was it.
"As they get older how do you stop them just wanting the stuff that is 'nice'? I know what you said about them often choosing fruit if it's there, but it's not always like that...
"
You can't! There is no foolproof answer, and its not about control anyway. How do you stop yourself just wanting the stuff that is just nice? You cant! You either want it or you dont! How many young adults whack on a stone when they move out of home for the first time and realise they can have takeaway every night if they want to? Lots!
What you are doing really, is bringing them up in an environment where those things exist, and are enjoyed in moderation without guilt, not tied to behaviour or punishment. So in theory, they are less likely to eat 10 chocolate bars when they break up with their boyfriend, or starve themselves down to skin and bone when their parents split up, or less extreme variants, as well as having the skills to deal with their emotions in other ways, as well as having learned properly and possibly earlier than their peers why certain behaviours are not acceptable or why its good to clear up your toys.
They might still learn to comfort eat, or punish themselves with deprivation, or end up on the yo-yo dieting merry go round - but you will know it wasn't because of you.
A lot of adult people wouldn't have that 2nd chocolate bar if they didn't feel so damn guilty for eating the first. Maybe some of them wouldn't binge drink on the weekend after a hard week. Or maybe they would! But I can't help thinking you'd be at least minimising the likelihood or severity of those behaviours surfacing.
But its almost making it sound more "worthy" and sanctimonious than it is - its really a very simple case of dont use food as punishment or reward, dont comfort or alleviate boredom with food, and dont label foods as good or bad but enjoy a variety of different foods in moderation to satisfy your appetite. Anything that goes wrong despite that attitude in the home was going to happen anyway.