Brakes are cheaper to replace because they are consumable parts. The gearbox isn't going to break if you use it to decelerate unless you do some really stupid and violent downshifts with reasonable frequency. You shouldn't 'coast' because if someone hits you from behind and your foot gets knocked off of the pedal, you've just been shoved into the path of another car/into the back of a car/into something/someone. If you are in gear and/or slipping the clutch as well as braking, this effect will be far less serious...
I don't understand people who coast. I've done it a few times, partly out of curiosity, and it even *feels* unsafe in comparison. Considerably so.
My driving instructor taught me loads of stupid things. He never brought it up if I coasted, he would tell me not to put it in neutral at traffic lights (eh? I ignored this advice and he didn't really mention it again), never to cut corners even if the road is empty, and so on. The ex advanced/blue light instructor who taught me after I passed told me never to coast, not to worry about cutting corners if there is nobody there (seems logical) etc