This is because in the UEFI firmware setup, no specific keyboard layout has been loaded. So it falls back to a firmware default, which almost certainly happens to be a US keyboard layout.
The computer doesn't really know what's printed on the various key caps on the keyboard. What it does know, is how to map keyboard scan codes to character numbers (normally in ASCII), which in turn it knows how to display as glyphs on the screen.
What you are seeing is an effect of this indirection.
There is a \ key somewhere on your keyboard while you're in the UEFI setup (and it turns out it's the same key that is normally used for # on the UK keyboard layout, as we found out in the comments), and you'll just have to do a bit of experimentation to find it. You should be able to find any key that exists on a US keyboard layout, although the physical location of the key that produces that glyph may be somewhat non-obvious.
You'll see the same effect if you set your operating system to use a US keyboard layout.