If you only give antibiotics 5 days and should have given it for 10 days, you will not kill off all the bacteria. The bacteria that survive will develop a resistance to that particular antibiotic and now you will need a different antibiotic to kill off the rest that developed the resistance. That's the way I understand it.
I think what you mention is VERY important and something people should learn from. In the long run, you can do more damage by incorrectly dosing and not completeing the proper regimen of antibiotics than you can not giving them at all. Most people will visually see the dog getting better and will stop the antibiotic treatment before it should have been stopped.