Board Thread:Naruto Discussions/@comment-24731718-20180914031021/@comment-1458758-20180915071026

In Japanese culture, you take on the family name of whoever's family has a higher status. So you can be a member/descended from a clan regardless of which parent it is.

When it comes to Karin and Nagato, they likely didn't take the clan name because the clan and their village was forcibly wiped out, so calling yourself Uzumaki was likely a liability after that, so their families didn't keep the name.

Naruto is a different case, there were known descendants of the Uzumaki in Konoha, but taking the Namikaze name would have made Naruto an even bigger target, so it was safer for him to appear as some random descendant of the clan than the son of the Fourth Hokage.

The general rule still applies to people like Inojin, whose father doesn't have a clan or family registry, Shikadai, whose maternal line doesn't have a family name, but still confers him some benefits as seen in the novels, and Sarada, who has the Uchiha name despite there being literally three times as many Haruno as Uchiha at this point.