Typing an IP address, mask, gateway and DNS server into every laptop and phone by hand would be slow and full of clashes. DHCP hands these settings out automatically when a device joins the network. It is why your phone just works on new Wi-Fi, and a broken DHCP server is a common reason for "connected, no internet". Servers and printers often get fixed addresses or DHCP reservations instead of random leases.