I think that it is a lot about habit and organisation. For young guys just going shopping for real food (that you have to cook) will be a revalatory experience, and as for organising it at home, cooking it as well and getting it to work....
Here is my routine for 'away' food :
I work usually a 3 or 4 night shift pattern and they are 12 hours, so after getting up,eating,walking to the gym and getting at least some exercise and then starting my shift there is very little time to think about much else !!.
What i do is carry in to work on the first shift :
Tubs of cottage cheese
Packs of blueberries, rasberries and strawberries.
Stick of bananas.
Packs of walnuts
Tub of creme fraiche
Jar of honey.
A pack of cooked chicken drumsticks.
These all live in the fridge at work and mean that i can always eat something decent.
On a nightly basis we usually make up sandwiches/rolls (although i am currently trying lo-carb) so instead make up a tub of tuna chunks with some mayo and spring onions--that in itself can go a couple of nights.
In my rucksack i normally carry an apple or 2 and a tub of mixed nuts--pretty well anywhere i go .
During the non summer months i batch cook, mainly things like chillies/tom.bolognaise sauces and other warmers...i can microwave one of those for a meal at work too.
Just wanted to add that just over 2 years ago i was seriously overweight and a lot of that was due to a high stress night based job and constant grazing on high carb snacks especially. during a time when i was not only doing my shift but would usually be there for another hour or so beforehand working on team problems.
It didn't help that the only other food on offer on-site is vending machine snacks and in the morning the bakery loaded with cakes and pastries--unfortunately i just love that stuff, at one point i think i was living on stress coffee and cookies !!.