Apple takes the security of its system very seriously and as you already know, in System Preferences there is a whole section called Security and privacy in which it manages what has to do with the security of the system. One of the parts that we can configure is the famous Gatekeeper.
In this system devised by Apple since the Apple Applications store appeared so that if the application we are trying to install in our Mac comes from outside the app store we can't install it.
The fact is that Apple could not completely close the system to these actions because otherwise millions of enraged users would come to them, so what it did was give three possibilities, to be chosen by the user, that will allow you to do more or less things regarding the installation of applications. The three sections that you can indicate are the following:
As you can see, the first option would only let you install applications from the Mac App Store. The second option lets you install applications from the Mac App Store and also applications that without being in the Mac App Store come from developers identified in Apple and therefore free of malware. Finally, by selecting the third option, the system lets you install any application regardless of its origin.
The case that we have come to tell you today is that if at any time you have modified the behavior of Gatekeeper in terms of what we have told you, surely you have not changed it again after installing that application that needed that adjustment. That is why your protection would be permanently disabled until you did the same process to rearm it again.
Apple is aware of this and as if by magic, the Gatekeeper safely resets itself after 30 days of being modified. In this way, the system is controlled and safe again after you have forgotten to do it yourself.
I had noticed when installing an external application, and I thought it was a bug, but this explains everything