Although some still call them 'chips', I believe it's been quite a few years since vehicles used chips. These were the ones that were actually plugged into the vehicle and left there. No adjustment, no nothing. Plug in play so to speak. Today's programmers are just that. With electronics in these new vehicles more like conventional computers, both manufacturers and aftermarket companies have vastly more control and tunablility. As with the statement that if they worked the manufacturer would already incorporate it, or the government mandate it is not really true. The manufacturer has to make there product appease the masses and legalities of the states it sells them. So alot of compromise is done to make the vehicle work sufficiently for everyone and still pass all laws in all 50 states. Now, with that being said, some may very well be happy with there stock truck, which is fine. But there is also those that always want a little better. Modifying ones automobile has been going on since the first car hit the road. Me personally, buying a programmer strictly for added mileage gains only doesn't make sense. Mainly because it would take many, many miles of driving to recoup the costs. This is on diesel trucks, and would be more so on gas powered trucks.
I do run a programmer on my Dodge/Cummins. It's a Smarty Jr. and have it set on performance, which is a 100hp addition. I've installed this roughly 3 years ago and never removed it. I daily drive at this setting, and tow with this setting (14k 5'er). But I've also done other things to. I have an aftermarket cold air intake, a performance free flow exhaust, and most importantly guages. What this has gained me is roughly 2 miles per gallon overall increase in towing, but more importantly more usable power for when I need it.
So as for the original question, yes they can work. But just buying one hoping for a 5mpg increase will just lead to disappointment. Programmers usually have more results with diesel motors than gas versions. And with diesel programmers they all very in what they do. Some will cause very high EGT in a stock truck, others not so much. Just remember that the lower numbers ---30hp, 50hp--- will for most intents get the better mileage and still have acceptable EGT. When you start getting into the larger numbers ---100hp,150hp, 200hp --- these are offroad, racing, sled pulling levels and will melt down a stock truck in a heart beat. So the first thing to do if you want to go the programmer route is research, research, research. Know what you are getting before you get it. And to me, the most important mod one should have, and the very first one, is gauges. Especially on a diesel. If you don't know what's going on inside, then quite possibly the insides could wind up outside.