Horizontal gene transfer via plasmids could favour cooperation in bacteria, because transfer of a cooperative gene turns non-cooperative cheats into cooperators. This hypothesis has received support from both theoretical and genomic analyses. In contrast, with a comparative analysis across 51 diverse species, we found that genes for extracellular proteins, which are likely to act as cooperative ‘public goods’, were not more likely to be carried on either: (i) plasmids compared to chromosomes; or (ii) plasmids that transfer at higher rates. Our results were supported by theoretical modelling which showed that while horizontal gene transfer can help cooperative genes initially invade a population, it does not favour the longer-term maintenance of cooperation. Instead, we found that genes for extracellular proteins were more likely to be on plasmids when they coded for pathogenic virulence traits, in pathogenic bacteria with a broad host-range. Taken together, these results support an alternate hypothesis, that plasmid gene location confers benefits other than horizontal gene transfer.