The reasons for reservation of these top-level domain names is to reduce the likelihood of conflict and confusion.[1] This allows the use of these names for either documentation purposes or in local testing scenarios.
Purpose
This top-level domain is sometimes used as a pseudo domain name in Uniform Resource Identifiers (URIs) to convey either an error condition or in use of privacy protection. A notable instance of this usage is in the Session Initiation Protocol (SIP) where the domain name anonymous.invalid in a SIP URI indicates hiding of a caller's identity.[2]