This article should help:
Managing EFI Boot Loaders for Linux: Basic Principleshttp://www.rodsbooks.com/efi-bootloaders/principles.htmlThe EFI boot process doesn't refer to code in the MBR, and it normally doesn't use code in the boot sector of a partition, either. Instead, the EFI loads the default boot loader (normally EFI/BOOT/BOOTX64.EFI) or a boot loader whose filename is stored in the firmware's flash memory. This boot loader can then load an OS directly (as the Windows EFI boot loader does) or it can present a menu or prompt with additional options (as Linux EFI boot loaders do).So we know that a bootloader (such as grub-efi for linux) can have the filename stored in flash.
But the question is how did it get there?
When you installed Ubuntu it would have installed packages such as grub-efi or grub-efi-amd64 which is the most common EFI bootloader for Linux. There probably would have also been a software package called EFI Boot Manager:
http://linux.die.net/man/8/efibootmgrefibootmgr is a userspace application used to modify the Intel Extensible Firmware Interface (EFI) Boot Manager. This application can create and destroy boot entries, change the boot order, change the next running boot option, and more.Some info on UEFI booting in Ubuntu here:
https://help.ubuntu.com/community/UEFIBootingIn any case it appears that when ubuntu was installed, it used EFI Boot Manager to create an entry in flash so that you can boot ubuntu. Otherwise it would have had to install the ubuntu bootloader in the default path (since we wouldn't be able to tell the flash about any other place):
/EFI/boot/bootx64.efi
Which would not be the ideal solution if the same disk was required to boot more than one operating system.