I grew up nondenom Protestant; I am now agnostic. I will give you my take on the mind of Yahweh, but a little sojourn into scary waters, and a footnote about ancient spats between religious movements is needed.
First, the footnote. You will find, if you research the topic, that early Christian leaders (talking early apostles here!) DESPISED the notions of Gnosticism, a (then) contemporary branch of Theosophy that tried to explain divinity through the zeitgeist of the time. From that emerged the concept of "the demiurge"; a faulted but not purposefully evil god created out of a selfish desire. Due to its defects, it could not inhabit the proper divine realm, and had to be exiled into a void, and prevented from learning about the real celestial reality. Being truely divine though, it has some 'natural', instinctual understanding, and real powers. Cocooned inside its own mind, it has REAL solipsism, and the world it has created this way is our material universe, complete with failings of design. Naturally, the early Christians HATED the idea. I don't like the idea either, because it relies on the notion that there is an ideal higher up the food chain, and that this ideal has human understandable motives and existence. That is nonsense to me, but the idea has some interesting properties.
Now the scary waters.
The Hebrew god is depicted as an unyielding, iron hard, immovable, omnipresent, omniscient, and omnipotent being who's actions are inscrutable, because he always takes the optimum choice, from a position of perfect knowledge. The position of the accuser on the other hand, is of a popular " noble" of the celestial court, who thinks things would be better if done differently. (This has parallels with Gnosticism, in that the act that creates the demiurge is similarly defiant of the proper divine order, resulting in a defective god being born. In this case though, it is a challenge in heaven about god's decisions, predicated on the notion that gods understanding is faulty. Hence the accuser and his challenge concerning Job. Instead of a defective god, though, we get a defective world, as god permits the accuser to attempt to prove his case, to disastrous effect. ) God permits the accuser to prove his allegations through demonstration, already knowing what the outcome will be, and even knowing that the accuser would make the challenge.
Many people have struggled with the idea of why god created the devil/accuser to begin with, given that god has infallible foreknowledge of all outcomes, and would thus know that creating the accuser will result in the challenge, and in the suffering/trial of creation. This is because they have apriori set an absurdly simplistic ideal as the desired end goal of this being, and amusingly, this parallels the very challenge of the accuser.
Like the accuser, these people assert that gods methods are incorrect. That changing them will result in (their view of) the ideal outcome. (Usually this is some sort of spoiled fantasy wish fulfillment where humans can do anything they want and god cleans up all the consequences.) God created the ultimate expression of this in the ultimate strawman, the accuser, to prove it wrong, through demonstration, to us.
Why go through all that effort though? God is seeking to create equals to himself. That is why. He needs candidates that naturally, reach the conclusions he has, by giving examples of misrule, and showing that consequences aren't something you just wish away if you are creating another true intelligence, especially if that intelligence must coexist with others, without destroying the others.
See again the origin story of the accuser:
God creates him perfectly; he is exactly what god wants.
He is exaulted as a perfect being, and lives in heaven.
He believes that he either understands god, or can do better than him.
God creates man, his true magnum opus. This enrages the accuser, as planned.
The accuser realizes that he cannot have unconditional approval (consequence free existence) if this "man" continues to exist, and in a jealous rage, seeks to destroy it. He does this by seeking to turn man against god, and thus force god to destroy the man.
God knows all about this, knew about it before even setting anything in motion at all, and knows what the final outcome will be, and is allowing the accuser to do this, because the actions of the accuser unwittingly and unerringly will bring about the metamorphosis of the man into his desired, ultimate form; a being who understands the nature of consequences, and chooses good choices, in line with the ideal choices god makes. Eg, a being that can coexist perfectly with god, and any other creation god may make. The accuser is a required construction needed to fulfill this purpose. The end goal is not to create an eternally spoiled prat, like the accuser, who thinks they are right, and god is wrong, and god needs to give them everything they want, when they want it, and magic away all the consequences (impossible with more than one such creation, as mutual existence will create consequences due to disagreement.), but to create a being, who through experience, accepts gods decisions without question, having learned, through experience, that going against it causes suffering, and is the root of all suffering. One who has learned the cautionary tale, by observing and understanding the accuser.
In this light, the demiurge like character is the accuser, who's faulted ideas about what should be, cause horrible suffering. God seeks beings that reject his (accuser) world, and willfully choose god's judgement. This is why the early apostles HATED having Yahweh associated with it.