Yeah exactly because the rules allow them to, which is bad.
Well if the stupid engine rules were not in place, this scenario would never happen, why would Hamilton have any reason to save an engine and gearbox if the team were allowed to build a new one for the next race?
Several drivers have shown us that no matter how far back they are, good finishes can be had, examples being John Watson in Detroit in '82 or Keke Rosberg at Zolder in '84 (well, almost). I would bet that Hamilton placed in the same position would want to give up, partly because of the rules which allow him an easy way out and make it impossible to overtake.
You also have to admire the likes of Gilles Villeneuve, trying desperately to get back into the pits to stay in the race with a disintegrating rear tyre at Zandvoort in '79. It would be a fairly safe bet that most modern F1 drivers including Hamilton would probrably just park it as soon as they went off the road with a flat, but Villeneuve with his determination that could burn through walls got back on the road and carried on until his car could move no more because the rear suspension had collapsed.
That dosen't change the fact that some of the rules in place in F1 are crapola, drivers should be rewarded for not giving up, not the other way round!
T'is the same problem with Q3 cars qualifying on race fuel, qualifying should be a test of who is the fastest, race stratergy should not influence it at all. The cars should be fueled to the minimum and the drivers and cars should be driving at the limit.
The problem with the rules at the moment is that they encourage holding back and giving up, there is no reward for insane determination in the face of unlikely odds, looking back I think you'll find most successful racing drivers (if not most successful people), have immense determination, the current set of rules has perhaps lead to a generation of F1 drivers who lack this trait which they really should have.