BIOS firmware doesn't really choose the bootloader. It loads code from sector 0 of a drive and executes it. Whatever is there, it will execute. Hopefully it is a bootloader (or something that loads a bootloader) but it doesn't have to be. In the early PC days you had games on floppy disks that would simply boot and run without an OS - these are now called "booters."
UEFI firmware actually understands partitions and filesystems, and scans drives for a UEFI System partition type. Since this is a filesystem, multiple bootloaders can be placed here. UEFI firmware is supposed to provide a menu or other way for you to select which bootloader is used.
Many UEFI systems are booting in "Legacy mode" - where the UEFI loads a "Compatibility Service Module" - something that makes it look like a BIOS - and actually work like the BIOS.
GRUB is a common open-source bootloader that can either boot Linux or "chainload" (give control to) a Windows bootloader (typically winload.exe in the Boot folder of a Windows partition). GRUB is what's giving you the ability to make a decision. GRUB can read configuration files and take its default choice from them.
Read this if you want copious, gory details.