In some occasions it's important to know your public IP address. For instance if your computer sits behind a router, which has assigned a private IP address, and you offer services, like a FTP- or WEB server, you want to make accessible for others.
The common home network often provides internet service for several desktops, smartphones, tablets, IP printers, IOT (Internet Of Things) and other internet capable devices. Your router usually provides a NAT (Network Address Translation) method to allow many connected devices to share the same public IP. Every locally connected device has a public IP, like 192.168.0.100, 192.168.0.101 and so on, while the [WIFI] router has usually the gateway IP 192.168.0.1 in this case. Local IPs are not routed into the internet. Also your neighbors tablet or PC might have 192.168.0.100 as local address. The NAT method accepts a connection request, from let's say 192.168.0.100 to www.google.com, saves the IP internally and modifies it to the public IP your provider has assigned to the router. Google sees the public address and returns the search result to it. After the router received the answer it looks up the internal table to find out which of the local machines sent the request and re-translates the public address to the private address of the local machine and sends its browser Google's search results.
Every device directly connected to the internet has a routeable (to the internet) public IP. Since these are limited in number, at least for the IPv4 addresses, and there are some billion internet users in the world - most in a local home network - NAT is the most common way to provide all of them with an IP address.
Normal internet users will have no need for knowing their public IP - or even know, what that is. But those offering services, like servers, or be it the remote-sharing of the own desktop, need to know this address and provide this information to those who want to gain access to a shared service. For example need web server admins, whose server is behind NAT, provide this information to other internet users, who want to access the web server. Without this knowledge of the IP address they have no means to connect to the server other than if the server admin setup a Dynamic DNS service, which resolves a given URL to its IP.
Besides the knowledge of the public IP address a server behind a NAT must either forward the appropriate server port(s) to the internet, thereby exposing these port(s) to everyone else. Or put the entire computer inside the so called DMZ (DeMilitarized Zone), thereby exposing all ports to the internet. Either method might have security implications. Only experienced administrators should even consider to run web services and provide them for the internet.