That's largely because no one wants to use GNU/AT&T assembler syntax. In the official Intel syntax, the important 4 lines of code would be more like
mov ax, 0b800h ; ax = b800
mov ds, ax ; ds = ax
mov byte ptr , 'A' ; ds: = 'A'
mov byte ptr , 1eh ; ds: = 1e
mov word ptr , 1e41h
I am the one who enjoyed using AT&T syntax. It remainded me old-days PDP-11 assembler.
The result should be generation of intermediate files and the final hello.efi program file of about 46KiB on a 64-bit system
That's bigger than the whole MS-DOS 3.2 kernel.
If you use coreboot and libpayload it's much easier because it offers you built-in GDB server you can connect to via serial port.
EDIT: as pointed out by a sibling comment, the UEFI firmware may support a CSM (compatibility support module) that can boot a legacy BIOS loader.