As oscardejarjayes has said, the $10 isn't for computer resources, it's mostly to pay the customer facing domain registrars and disincentivize squatting domains. Each subdomain (.com, .ca, .uk, etc) is controlled by some entity and for national domains part of the fee is a tax set by and collected for that nation.
In terms of the "compute" required for the DNS -- that's actually your internet service provider. ISPs synchronize and serve up DNS locally in order to give you faster internet (so users pay for DNS indirectly). You might have switched your domain to 8.8.8.8 (Google's DNS servers) which Google provides for free in order to try to speed up peoples internet access.