-ICANN charges contract fees, $100k+ to registrars to become accredited.
-TLD operators (like Verisign for .com and others for every other cool TLD your users might want to register) charge a base fee to the registrar per domain that is registered.
For example, Verisign (holder of the .com TLD) charges roughly $6 per domain to the registrar.
Registrars then have to pass on those costs to you AND add a little more for their own operating expenses and profit.
Many registrars use domains as a loss leader. They LOSE money on domains in order to upsell you on other services (hosting, SEO, ecommerce, etc.).