I think it's to predict what potential epidemic might look like. For instance, scientist perform gain-of-function experiments on the influenza virus to understand which viral protein increases virulence, which can then be used as a reference to develop vaccines or antivirals in advance.
This is just one example, there are a lot more to the debate between benefits and risks of such gain-of-function experiments, which I'm thinking of writing about.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4996883/
https://mbio.asm.org/content/5/4/e01730-14#:~:text=The%20power%20of%20GOF%20experiments,by%20using%20other%20scientific%20approaches.