This is most likely caused by horizontal gene transfer, which is the process of transmission of genetic material between organisms caused by any process different than parent to offspring transmission (which would be vertical transmission). This has heavily influenced evolution