What is the purpose and function of the "Media Storage" application and the media scanner? I want to know what the purpose of the system app "Media Storage" and the media scanner is for and why for any reason a user would choose to not scan media on boot.
Media Storage, package name com.android.providers.media, is an implementation of MediaStore:


  The Media provider contains meta data for all available media on both internal and external storage devices.


It scans and stores media file info for quick access, and provides secure (content:/// scheme, as with all other providers) URIs pointing to the files for access by other apps.

By default, Media Storage has a broadcast receiver MediaScannerReceiver that listens for android.intent.action.BOOT_COMPLETED, so media scanner will launch on boot. Such receivers are unlikely to be disabled by end users unless with root permissions.