This will be legal except for some bizarre and very unlikely scenarios — unlikely both technically and sensically.
The only scenario when it is technically possible
Nowadays that is rarely possible: the IP address(es) that you find will either be shared with other sites, or point to an intermediary service making the site highly available and fault tolerant, or both. This requires the correct domain name to be passed with the HTTP request for it to be successful.
But once upon a time it was pretty common to setup websites in such a way that they had just one IP address associated with them (often they did not even care what domain name was used to access them, or whether it was used at all, which was making it possible to open the website in a web browser just by the IP address). This setup is nowadays rare but still existent; it is the only case where pointing another domain name is possible.
Examples of scenarios when it is illegal
- Rob owns a very popular website and wants to create some troubles to Bob who owns a website much less popular. Rob points his popular domain name to the Bob's IP address. Given that no automatic scaling is enabled on the target, Bob's site gets down. Or, if scaling is enabled and not limited, Bob gets astronomical bill from its cloud provider (Rob's visitors suffer for a while but Rob is fine with that);
- Rob wants to create bad publicity for someone presented on the web. He registers a domain name like "theseguysarecheatsandthieves.com", points it to the target IP and does some SEO so that the target is findable on the new domain name. Rob hereby commits defamation;
- Rob wants to steal Bob's customers. As in the previous example, he registers and points to the site a more appealing domain name than the original one. He does some good SEO and now the majority of Bob's customers come via Rob's domain name. Finally, Rob points his domain to his own site and serves the customers that Bob once had.
Why is it legal otherwise?
Without speculating about the possible goal of pointing a domain to someone else's website address, attainability of that unspecified goal, and available alternatives, let's see what consequences may arise if someone does just what the OP says and draw conclusions from those.
So, we assume that the target can be opened by its IP address as mentioned earlier. In this case, any domain name can be pointed to that IP; upon entering the domain name in the web browser, the site will open. It won't be necessary to even register a domain to point it: one could simply edit their local
What trouble does that create, barring the weird cases exampled above? None. No copyright infringement, no fraud, no hacking, no damage, nothing. Who's right are violated? No ones. Hence it is perfectly legal.