First, the application installs its own schema in the gsettingsschemadir set by installFlagsArray. Second, the prefixup phase runs adding this path to GSETTINGS_SCHEMAS_PATH. This is necessary to run after the install phase because addToSearchPath requires the directory to be already existing (which is a good thing to require in order to avoid cluttering env paths). Finally, wrapProgram in the preFixup hook will find the $GSETTINGS_SCHEMAS_PATH set.
Since the preFixup (or postInstall) hook can also be a function, a ugly trick would have been necessary to "override" that preFixup (or postInstall) to let me run the addToSearchPath.
This way instead, like for preInstallPhases, we have a preFixupPhases that runs after installation and before the fixup phase, and that's useful for setting variables that depend upon the just installed files.