I came across this sentence and I can't figure out what the purpose of に is. The full sentence in context is:
天照大神【あまてらすおおかみ】には須佐之男命【すさのおのみこと】という弟の神様がいたのですが、須佐之男【すさのお】はとても乱暴【らんぼう】で悪いことばかりするので、人々はとても困っていました。
I factored out irrelevant clauses from the sentence so it boils down to:
天照大神【あまてらすおおかみ】には須佐之男命【すさのおのみこと】という弟の神様がいた。
In my experience, に combined with the existence verb いる marks the location in which someone exists or is:
友達は家にいる。My friend is at home.
But it doesn't make sense to me that the god 須佐之男命【すさのおのみこと】 exists in 天照大神【あまてらすおおかみ】, but I rather think that the meaning is simply that 須佐之男命【すさのおのみこと】 has a brother 天照大神【あまてらすおおかみ】:
天照大神【あまてらすおおかみ】には須佐之男命【すさのおのみこと】という弟の神様がいた。Within the Great God Amaterasu, there was [her] younger brother Susanoonomikoto (it feels wrong to me).
I would rather say the same sentence without に
天照大神【あまてらすおおかみ】は須佐之男命【すさのおのみこと】という弟の神様がいた。As for the Great God Amaterasu, there was [her] younger brother Susanoonomikoto.
What is the function of this に?
Thank you in advance.