Most of the costs to provide digital services are salaries for the employees. You need engineers, support staff, lawyers, and some supporting roles like finance and security/compliance to meet the legal and contractual obligations of the service.
And serving DNS for the root or a big zone is technically challenging. You want 100% uptime despite DDoS attacks, that's not simple.