Because if it so happens that gain of function research accidentally caused a global pandemic, we need to know so we can properly evaluate the risk of continuing such research. Which could also be part of the motivation for governments to cover that up. I'm not saying that's necessarily true, but I haven't seen that it's false either, and the way China and other officials and related expecrts have acted, trying to dismiss the lab leak theory as just wild conspiracy theories or politically motivated, makes me suspicious.
There were serious attempts to completely shut the conversation down and prevent investigations into there being a lab leak.
So it would be okay if it was a lab leak where gain of function was used because similar viruses almost caused a pandemic? I doubt the general public would see it that way.
The discussion isn't whether labs need to be secure, or if a lab leak is bad. The discussion is whether it not it's likely that SARS-CoV-19 was a lab leak.
There were serious attempts to completely shut the conversation down and prevent investigations into there being a lab leak.