The purpose of a name server is to provide a web browser with information about the server IP address at which a website can be reached. If such a name server fails, this information can no longer be provided. The website would then no longer be accessible.
For this reason, the provision of information is secured - with a second name server.
If one of the two name servers fails, the other name server seamlessly steps in and ensures that the information is provided via the server IP address of the website.
In order to guarantee this reliability, two different name servers must be stored. They are distinguished by the IP address. This mandatory failover is specified by the Internet Assigned Numbers Authority (IANA).