mishfish - If you think about what the antibiotic is doing, it's killing the pathogenic bacteria, or suppressing their replication to the extent that the immune system can kill them. Any population of bacteria will have a range of sensitivities to an antibiotic. (Although bacteria generally reproduce asexually [but see next paragraph], and therefore don't have any genetic mixing, they are very prone to mutations and there will therefore be some variation.) Obviously, the drug will kill off the most sensitive bacteria first but take longer to kill the least sensitive. If you only take part of a course of antibiotics you will kill off the most drug-sensitive bacteria but leave the least sensitive. With the drug-sensitive ones out of the way, the relatively drug-resistant bacteria will have a clear field to replicate, so the population will shift to being more drug-resistant. If this happens repeatedly you will end up with predominantly drug-resistant bacteria.
Remember that in most infectious diseases it's not actually the bacteria/viruses/etc. that make you feel ill, at least in the early stages of infection: it's your body's immune response to them. (If you didn't have the immune response you wouldn't feel so ill initially but the pathogens would replicate uncontrollably and eventually kill you.) The really ill-making phase of the immune response might be over while there are still pathogenic microorganisms in your body, so the fact that you're feeling better doesn't mean it's safe to stop taking the antibiotics, especially as the remaining bacteria will be relatively drug-resistant. That doesn't necessarily mean you will get ill again but it does mean that the population of bacteria in the environment is becoming more drug-resistant.
Also, bacteria are able to swap genes, either by bacteria simply picking up loose DNA from other bacteria that have been broken down (transformation), from being infected by viruses called bacteriophages that carry genetic material from other bacteria (transduction) or through the sexual reproduction that occurs in occasional generations of bacteria where structures called pili transfer genetic material from one bacterium to another of the same species (conjugation). This allows resistance to emerge in bacteria that haven't previously been exposed to the drug and can lead to enormous problems with multi-drug resistance. So we now have forms of gonorrhoea, for example, that are effectively untreatable. If you leave a reservoir of drug-resistant bacteria in your body by failing to complete your course of antibiotics, they may be held in check by your normal resident microorganisms but they will have the potential to confer resistance on other bacteria. And so it goes on...