docker in macOS running arm64 on amd64
Because the Docker on MacOS (your machine) comes with a Linux virtual machine (Docker container need some features of Linux kernel to run, so it cannot run on MacOS alone). That Linux VM has been configured with QEMU and binfmt_misc, so it can run the arm64 container. Meanwhile, your friend machine has Docker running on his native Linux (not via VM), and his Linux is not configured enough to run arm64 container.