The WHOIS service is almost as old as the modern Internet. When you register a domain name, ICANN requires the domain registrar to collect the contact information of the domain holder and make that publicly available. There are a number of sites online that let users query the WHOIS database for various domain names. This site also has such a whois service.
Some registrars give their clients the option of private registration where the owner's contact info is replaced with generic data to protect the client's identity. That is fine except that some registrars like GoDaddy and Network Solutions charge fees for such a  service that cost them nothing to operate. Some ethical registrars such as Google Domains or 1&1 offer this service for free.
By ICANN rules The owner, administrative and technical contact information for the domain must be kept current which is why domain owners are contacted annually to verify this data and update it if necessary. There is also another ICANN rule that obligates registrars to make this information publicly available over a web page as well the whois service on port 43.
Here's where some domain registrars such as GoDaddy are in violation of the ICANN rule. A whois lookup for a domain registered on GoDaddy reveals that the domain's WHOIS information is delegated to whois.godaddy.com. Querying whois.godaddy.com for that domain over the whois port returns very little contact information for the domain when it should return complete contact information according to the ICANN rule. Instead it points users to GoDaddy's own website to get the domain details.
One must assume this is a GoDaddy scheme to get visitors to its site to peddle its products and services. But how does it get away flouting ICANN rule? So is it a rule or a suggestion? Some may approve of GoDaddy masking much of the domain contact info over WHOIS as a way to road-block spammers from speedy access. Of course this data can still be had on GoDaddy's own website. But if GoDaddy's intentions are to protect its clients from prying eyes, then why does it charge them for private registration that cost $0 to operate?