It happens, but the human body is pretty good at fighting off infection....It takes some work to fuck yourself up....I've never had an abcess or an infection that got to the point that I needed medical attention in well over a decade of using needles....
My guess as to why muscling(IM) drugs seems to cause more infections than IV....If an infection is in an area that's mostly smaller blood vessels it's harder for your body's natural defenses to reach the offending bacteria and kill it off....at least, that's my guess...
Edit:Also, if whatever you're injecting is just kind of "sitting there" and not directly flowing in the bloodstream, it gives the bacteria more time to multiply and attack the surrounding tissue. again, that's my guess...