DNS blocking works better than IP address based blocking because you can block domains and hosts instead of IP addresses. And it still blocks the domain/host even if its IP address changes.
Generally blocking DNS names works well for server-side blocking. But client IPs either do not have associated domain names, and even if there's a hostname associated with a client IP it'd cover all the clients behind the same public IP so the problem remains.