Often pathogenicity is related to the presence of specific genes that are organized in the so called pathogenic islands. This genomic region can be taken up by bacteria via Horizontal gene transfer. This means that a non-pathogenic bacterium can acquire a new sequence of DNA from different species or also different genus that contains the above-mentioned pathogenic characters. This acquisition process can interest only one or few strains. In this way, if these strains were not pathogenic before they have a good change to express some pathogenic features. Take a look at this link:
Shortly...the non pathogenic bacteria acquire pathogenic mechanisms (many) through gene transfer from pathogenic ones (conjugation, transformation, transduction, etc)
Thanks for all the replies. Sorry I didn't make my question very clear, but Yosef got me. I am asking from the aspect of evolution. It seems like the pathogenic ones can get more benefits with survival and propagation, but actually the most strains are non-pathogenic; even in the same environment, pathogenic and non-pathogenic ones exist at the same time. Even though we know that bacteria can get virulent gens by horizontal gene transfer (I think in both active and passitive ways), but why most of the strains choose to not taking exogenous genes to become pathogenic?
its an interesting question. I think the population of special strain is depend on the enviromental conditions. some times population of pathogenic strains increase and at the same time non pathogenic strains are in stationary phase and its because of regulatory genes and their expression. the regulatory gene may be a virulence assocciated gene.
The term "pathogen", inasmuch as it indicates the capability to cause disease, is quickly becoming obsolete. In fact, in an article in Nature (11 December 2014), Casadevall and Pirofski suggest to discard it altogether. The reason for this is that the capability of a microorganism to cause disease depends on 3 factors, only one of which is related to virulence factors described by the previous answers. The two other are the function of the innate or acquired resistance of the host and environmental (risk factors) that influence primarily the latter. Consequently the division of microorganisms cannot be binary (pathogens and non-pathogens) but is rather a continuous variable: high risk when a microorganisms with a highly pathogenic potential interacts with a host with low resistance (an immunocompromised patient for example), low risk in the contrary condition but all the possibilities between these extremes occur.
Another point worth pointing out is that the number and activity level of the virulence factors does not necessarily correlate with pathogenicity. Two examples: Staphylococus aureus and Pseudomonas aeruginosa. Both posses an impressive array of virulence factors, are commonly found on the skin and its annexa but are involved in dis-proportionally low number of infections.
Just noticed the second part of your questions. In most cases the non-pathogenic microorganisms came first. One mechanism is based on the loss of some of their genes (often related to environmental survival) in the process of adaptation and evolving or acquiring (often by phages) genes that are important in their survival in the host. A good example is the evolution of Yersinia pestis from Yersinia pseudotuberculosis. However, with a few exceptions, (Yersinia pestis being one of them) it is the "interest" of the microorganism to reduce the level to which it will elicit a response by the host thus minimizing the energy expenditure required to counter such response. Consequently, in the long run, an attenuation of the pathogens may occur by selection of the energetically more efficient strains.
Not pathogenicity of bacteria is defined by stability of genetic material which remains in evolution process. However, mechanisms of horizontal gene transfer take place.
My first research project was working to determine which genes allowed various strains of E. coli to overcome gastrointestinal niches from native flora in the murine colon. It seemed to be a result of which carbon utilization genes and anchor proteins were available to that particular strain (able to metabolize fucose/ not able to metabolize fucose), and so on.
Dr. Andrew Fabich could tell you more about intestinal bacteria and pathogenicity. Look for his papers on citrobacter rodentium.