As to your question regarding origins, we do not know the author or the means of revelation of the book of Job.
What we do know is that there is an ancient tradition including the book in Hebrew scripture. The book makes no reference to the patriarchs or the law or the prophets but it is consistent with teachings therein and is commonly considered to predate those writings in scripture.
As to your point that none of the characters are Israelites, I would point out that the language and ideas used are very consistent with Hebrew scripture. e.g. the names of God: Yahweh, Adonai, Elohim, El, Eloha, Shadai, Creator; angels, Satan, priestly functions, atonement, integrity, iniquity etc. The idea of self righteousness vs the Righteousness (graciousness) of God; spiritual warfare etc. The writer does not define any of these terms or ideas. He presumes that the reader is familiar and that implies that there was a common tradition, perhaps written, perhaps oral, that predated the writing of the book. The book of Job is a grand introduction, an overture to the revelations that follow in scripture.
As to your question of theorizing about the revelation and preservation of the book of Job, or scripture in general, I would point out that there are many similar questions concerning other scripture. e.g. how did Melchizedek, a contemporary of Abraham, come to know and practice the same priestly functions that Job practiced? And the patriarch, Abraham, honored him; and the New Testament approves them. It appears that A & M & J had a common tradition. Joshua chapter 10:13, and 2 Sam 1:18 references the book of Jasher, which is lost to us. What was Jasher? Where did it come from? Where has it gone?
Your question about 'theorizing' really involves the bigger idea of unanswered questions in scripture. God's answer to Job's numerous questions about 'how...' and 'why...' is not a detailed explanation. God's answer to all of Job's questions is, simply: 'I am Creator! Look around you! You don't think I know what I am doing...?' Implicit is (theory): God's eternal plan, God's faithfulness to Bless his covenant/plan to you, and man's ability to faithfully bless God back; man's ability to 'know that I am LORD...' (numerous references throughout scripture. Search it...e.g. Ezekiel 60 times) Proverbs 25:2 says: 'It is the glory of God to conceal a matter; to search out a matter is the glory of kings.' Job's place in scripture is a tremendous harmony... It's necessary for each of us to connect the dots in our own attitude of faithfulness and reverence... (...blessed be the name of the LORD... 1:21)