There’s an official registry of status codes: https://www.iana.org/assignments/http-status-codes/http-stat....
HTTP libraries normally use this as their canonical source of status codes that they should have constants (or whatever) defined for.
But 418 I'm a teapot is not in that registry. It’s not clear to me why it wasn’t put in when the registry was established, but it seems most likely that someone made an executive judgement against pointless fun.
To my knowledge, it’s the only status code from an RFC that has not made it into the registry. So many HTTP libraries, perhaps most, have this one exception, an extra status code not from the registry.
In 2017, the httpbis working group chairman Mark Nottingham (mnot) sought to get 418 removed from libraries everywhere (since it wasn’t registered and wasn’t serious); this met with popular resistance (people like their fun) and so he changed direction and sought to have 418 registered properly instead, with https://datatracker.ietf.org/doc/draft-nottingham-thanks-lar.... But that draft was allowed to expire and I’m not sure why.