The legacy mode has obviously been enabled within UEFI to support the legacy boot of operating systems that do not support UEFI. Your Windows installation obviously is NOT an UEFI installation, but rather a legacy installation itself.
You can enable the UEFI-boot in the "boot" or "startup" settings most of the times within BIOS/UEFI (in my case it is under startup). Change the Boot Mode from Legacy to UEFI. Then you can enable Secure Boot (normally a different point in menu tree) too (which you should if you only run Windows 8/10). You then have to reinstall your whole OS - boot from an UEFI disk/usb/pxe etc.
An UEFI-Installation of an operating system is required to directly get to the UEFI-Settings from the OS and have the full integration features between the UEFI and the OS.
If you really want to have a dual-boot environment you can either stay with BIOS and use the ubuntu installer to make it dualboot or go with UEFI dualboot - see https://askubuntu.com/questions/666631/how-can-i-dual-boot-windows-10-and-ubuntu-on-a-uefi-hp-notebook for instructions to achieve that.