The installation script has to update an endpoint security extension, so it first copies a signed app with the extension embedded in it and then executes that app and suspends security checks until the main app is installed. Then it runs the main app as a command line tool. The first app that updates the security extension is then removed.
The two steps are needed because the endpoint security extension prevents modifying the main app.
When the main app acts in "install" mode, it configures a daemon and an agent. It configures a security agent plugin and updates authorization db to use it. The main app and security agent plugin communicate with the daemon using XPC.
A managed policy is installed that gives the app and the endpoint security extension full disk access.