Thats one way that viruses can cross the species barrier. There are others. And it all gets so very complicated, and even for experts in the field it is the usual story of various theories, some of which are well accepted, but there is not always agreement between experts as to which one(s) applied in a particular instance.
Some examples that I am aware of from looking at influenza in the past are reassortment, antigenic shift, antigenic drift.
en.wikipedia.org
Reassortment is responsible for some of the major
genetic shifts in the history of the influenza virus. The 1957 and 1968
pandemic flu strains were caused by reassortment between an avian virus and a human virus, whereas the
H1N1 virus responsible for the
2009 swine flu pandemic has an unusual mix of swine, avian and human influenza genetic sequences.
en.wikipedia.org
When two different strains of influenza infect the same cell simultaneously, their protein
capsids and
lipid envelopes are removed, exposing their
RNA, which is then transcribed to
mRNA. The host cell then forms new viruses that combine their antigens; for example, H3N2 and H5N1 can form H5N2 this way. Because the human
immune system has difficulty recognizing the new influenza strain, it may be highly dangerous, and result in a new pandemic.
en.wikipedia.org
Antigenic drift is a kind of genetic variation in viruses, arising by the accumulation of mutations in the
virus genes that code for virus-surface proteins that host
antibodies recognize. This results in a new strain of virus particles that is not effectively inhibited by the antibodies that prevented infection by previous strains. This makes it easier for the changed virus to spread throughout a partially immune population. Antigenic drift occurs in both
influenza A and
influenza B viruses.
Anyway although much of the detail there is influenza-specific, some of the concepts apply more broadly. I'm not that up to speed with all of this as it applies to coronaviruses but thats partly because human studies into these matters have been somewhat limited and are often speculative. And I get the distinct impression that even the 'closely related to this pandemic virus SARS-CoV-2' viruses that have been found in bats and pangolins are not that closely related really, in the sense that even if they are 90 something percent the same, their common ancestor may still have been a hundred years ago. So, lots of gaps!
Here is an article form 2015 about a different human coronavirus (OC43) and an attempt to study its evolution.
Coronaviruses (CoVs) continuously threaten human health. However, to date, the evolutionary mechanisms that govern CoV strain persistence in human populations have not been fully understood. In this study, we characterized the evolution of the major antigen-spike (S) gene in the most prevalent...
www.nature.com
I mention it right now because one of the things it says is:
During evolution, high frequencies of homologous RNA recombination and gene mutations are considered the main forces that push CoVs to adapt to specific hosts. Such events can lead to emergence of new strains or genotypes within a certain species and even to new species, causing epidemic or zoonotic outbreaks that continuously threaten human health
2,
3. This phenomenon is exemplified by the recent emergence of SARS-CoV and MERS-CoV
6,
7. However, the detailed evolutionary mechanism of interspecies transmission and the persistence of CoVs in specific hosts have yet to be fully elucidated.
I'd love to say more but I'm not knowledgable enough. I will say that as far as I know it would be perfectly possible for a coronavirus that happened to be well suited to human infection and spread to exist in an animal host for a long time without any notable effects on humans, if the animal in question (or an intermediate species of animal) does not have many opportunities to infect a human. And if that opportunity does arise at some point, the human in question doesnt really need to be run down or otherwise suffering from immune system problems in order to get infected by it and start spreading it. If the virus has certain properties that already allow it to thrive in humans, which could have been acquired in a number of different ways, then little more than chance is required to get things started in humans.
Most of this stuff really doesnt help rule the lab accident theory in or out. Because many aspects and details strike me as compatible with both scenarios. If one of the samples they took from a bat was highly transmissible in humans and a small error happened with infection prevention in the lab, its really not much different than the very same virus reaching humans via an animal, its only the final step that is different.
So all of this detail is mostly only useful in this lab discussion if dealing with people who have trouble getting their heads round how viruses evolve, how this stuff can happen naturally/via the way humans farm and otherwise interact with animals. Its useful if dealing with someone who thinks the lab is the only explanation. It doesnt rule out the lab. I remain mostly without evidence for or against the lab, and I do not know if that will ever change.
I do know that I will continue to disagree with those who want to characterise the Wuhan lab as being just like labs in cities everywhere. For one reason, that lab is the base of the most famous SARS-like coronaviruses in bats researcher, whose own initial thoughs upon hearing of the new virus in humans included:
“I had never expected this kind of thing to happen in Wuhan, in central China.” Her studies had shown that the southern, subtropical provinces of Guangdong, Guangxi and Yunnan have the greatest risk of coronaviruses jumping to humans from animals—particularly bats, a known reservoir. If coronaviruses were the culprit, she remembers thinking, “Could they have come from our lab?”
Fear not, the rest of the article is all about the other side of things, the continual risk that various forms of human activity involving animals and animal habitats creates. Of which there are plenty. But I am inclined to keep lab accidents on the list of things that humans do which pose theoretical risk in regards novel virus outbreaks, pandemics etc too.
Wuhan-based virologist Shi Zhengli has identified dozens of deadly SARS-like viruses in bat caves, and she warns there are more out there
www.scientificamerican.com