system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 Why once you start a course of antibiotics you have to finish it?

I understand it has to do with resistance to antibiotics, but why is it not true that the longer you are on the meds, the more resistant some of the bacteria get?
gpt
Every infection has bacteria that have mutations. Some of these mutations provide resistance to a specific antibiotic. 

When you take antibiotics to completion the majority of the bacteria are wiped out by the antibiotic and your immune system remove the remaining resistant ones.

If you take a partial course then only some of the bacteria are killed. If your body can’t finish of the job then they’ll start to build up again. But now the resistant bacteria get to multiply with lots of available resources rather than needing to compete. This is because lots of the non-resistant bacteria have been killed.

Once the bacteria have repopulated you can have a large proportion that are resistant so now the antibiotic doesn’t work.

Once this happens a few times you get bacterial strains with lots of resistances. This is a big problem in hospitals.