The preinstallation script checks the default login manager by looking at /etc/X11/default-display-manager. If lightdm is the default login manager, then nvidia-prime creates (if no lightdm.conf exists) or edits the configuration file.
In your case it should have just edited the file by adding or replacing the display-setup-script and the display-stopped-script sections. Maybe you didn't have a lightdm.conf before installing nvidia-prime?
The preinstallation script checks the default login manager by looking at /etc/X11/ default- display- manager. If lightdm is the default login manager, then nvidia-prime creates (if no lightdm.conf exists) or edits the configuration file.
In your case it should have just edited the file by adding or replacing the display- setup-script and the display- stopped- script sections. Maybe you didn't have a lightdm.conf before installing nvidia-prime?