They haven't "evolved defences." The resistant variant was there all along, then comes to the fore when the non-resistant variant is clobbered by the medicine. The medicine does not encourage or cause the resistant variant to arise, but may afford it selective advantage. Of course, organisms such as the one in the item reproduce quickly, and mutations can arise and proliferate rapidly. Evolution is a fairly complex matter and you need to do a lot more reading.