Mobile genetic elements (MGEs), such as phages and plasmids, often possess accessory genes encoding bacterial functions, facilitating bacterial evolution. Are there rules governing the arsenal of accessory genes MGEs carry? If such rules exist, they might be reflected in the types of accessory genes different MGEs carry. To test this hypothesis, we compare prophages and plasmids with respect to the frequencies at which they carry antibiotic resistance genes (ARGs) and virulence factor genes (VFGs) in the genomes of 21 pathogenic bacterial species using public databases. Our results indicate that prophages tend to carry VFGs more frequently than ARGs in three species, whereas plasmids tend to carry ARGs more frequently than VFGs in nine species, relative to genomic backgrounds. InEscherichia coli, where this prophage–plasmid disparity is detected, prophage-borne VFGs encode a much narrower range of functions than do plasmid-borne VFGs, typically involved in damaging host cells or modulating host immunity. In the species where the above disparity is not detected, ARGs and VFGs are barely found in prophages and plasmids. These results indicate that MGEs can differentiate in the types of accessory genes they carry depending on their infection strategies, suggesting a rule governing horizontal gene transfer mediated by MGEs.