In such cases, gene acquisition from other bacteria or the environment is called horizontal gene transfer and may be common under natural conditions.
What is horizontal gene transfer?
gene acquisition from other bacteria or the environment