There's even a ICANN rule I think that says a registrar and a registry can't be the same legal entity, which is why Google had to create a separate company called Charleston Road Registry for .dev, .app, .google etc (likewise Donuts created Dog Beach LLC and so on).
[1] I know most registrars offer additional services like hosting which smaller (and often non-profit) registries may not be equipped to provide. But that doesn't really answer the question. Why can't registries handle basic domain registration themselves & leave hosting to specialized providers?