What does the /data/system folder store and its significance? I know that /data partition contains user-generated data (/data/app - user apps, /data/data - app data, etc).

But what is the /data/system folder used for, and does it have any significance in the boot procedure (e.g. - boot scripts, etc)?

A sub-folder-wise explanation would be preferred.
data/system folder contains system configuration files critical to maintaining device's state. Access to the directory is restricted by the system apps only, so if the device is not rooted the folder content can't be seen.

Below is the list of files residing in the directory with a brief description. Note that the list is not completely full and also may vary depending on the OS version.


appops.xml - a configuration file used by the AppOps service which controls application permissions;
called_pre_boots.dat - a file used by ActivityManager to hold pre-boot broadcast receivers;
batterystats.bin - a binary used by the BatteryStats service to keeps power statistics of application installed;
gesture.key - lockscreen pattern;
inputmethod/ - a directory used to store IME configuration. Contains subtypes.xml with IME locales, keyboard layout sets etc;
locksettings.db - a SQLite database containing the lock screen settings;
netpolicy.xml - a configuration file used by the NetworkPolicyManagerService;
netstats/ - a directory used to hold NetworkStatsService statistics;
packages.list - a file used by the PackageManager service containing the list of all packages (apks) installed in the system (same as executing pm list packages within shell);
packages.xml - a file used by the PackageManager service to hold metadata of all installed packages, like UIDs, requested permissions etc;
profiles.xml - a configuration file to keep metadata of device profiles including sound mode, airplane mode, vibration etc.;
password.key - password hash;
usagestats/ - a directory used to store files for the UsageStats service. Contains usage-history.xml that holds info on all apps and its components with the last time a user used them;
users/ - a directory used for multi-user support. Contains userlist.xml which keeps info on all users in the system (0 - is a device owner/primary user); e.g. a sub-directory users/0/ holds info on the user account (accounts.db), widgets (appwidgets.xml), wallpaper (wallpaper_info.xml) etc.