Domains need to be registered annually and DNS servers are needed to route traffic to them. But using an IP directly, you don’t need to worry about domain registration issues that can brick your systems, and you don’t have to worry about DNS providers knowing about your traffic (or maintaining your own private dns).
If it’s not a user trying in a memorable domain, an IP serves much better.
Domains need to be registered annually and DNS servers are needed to route traffic to them. But using an IP directly, you don’t need to worry about domain registration issues that can brick your systems, and you don’t have to worry about DNS providers knowing about your traffic (or maintaining your own private dns).
If it’s not a user trying in a memorable domain, an IP serves much better.