The efi-update-loader script looks for efi type partitions on each disk associated with the root filesystem, looking at UFS and ZFS mirror, stripe, raid etc. configurations.
Its primary use is expected to be during 'installworld' and 'freebsd-update' to automatically update the loader that the UEFI system firmware uses to boot FreeBSD.
Unless the user specifies a device to use, it will use all such ESPs, and if there's an existing /EFI/FreeBSD/loader.efi it will copy /boot/loader.efi (or the otherwise
specified loader file) to /EFI/FreeBSD/loader.efi and backup any existing file as loader-old.efi if the new loader.efi isn't the same as the old one and there's available space to do so.
If there's a FreeBSD loader/boot1 as /EFI/BOOT/BOOT{arch}.efi it will back it up to /EFI/FreeBSD/BOOT{arch}-old.efi (if there's space) and copy the new loader to /EFI/BOOT/BOOT${arch}.efi.