Normally these fragments come from dead cells. These fragments enter through the membrane and incorporate into the cell genome. The fragments may or may not be complete genes and even then the genes may not work or have a different function in the new cell. Although bacterial cells can gain resistance to antibiotics, it does not necessarily mean that they promote pathogens. However, there is a broader scope to look at.
Antibiotics can kill of a wide variety of bacterial cells in a human body.
Many of these bacterial cells are known as bystanders. They can live, reproduce, and mutate in the human body without causing harm. In fact, many are considered good bacteria and exist in our intestines and stomach and are beneficial. Many antibiotics are not able to selectively target bacterial cells and in many cases these good bacteria and bystanding bacteria are killed off. By eliminating the competition, the resistant pathogens are able to have access to the body virtually unchecked.