A DELETE against a read-only collection, a POST to a URL that only supports GET, a client that has drifted from the API it was written against.
Why you would test it
Read the Allow header rather than guessing. It is the machine-readable answer to "what can I do with this resource?".
What your client should do about a 405
Read the Allow header — a compliant 405 lists the methods that would have worked, which is the fastest route from the error to the fix. Never retry with the same method.
405 versus the codes it gets confused with
405 vs 404 Not Found — A 404 means the path is unknown. A 405 means the path is known and the verb is not supported on it.
405 vs 501 — 501 means the server does not implement the method at all, anywhere. 405 is about this resource.
Endpoints that return 405
1 endpoint in this playground answers with 405. Every one is free, needs no signup, and can be called from the browser or with curl.