Why did Allah allow the jewess to serve Prophet Mohammad PBUH, the poisoned sheep, also why did Allah allow Prophet Muhammad's PBUH companion to die, from the jewesses poisoned sheep
All perfect praise be to Allah
Lets take this question in general, not specific to this event. Let the question be why Allah allow prophet to be hurt in any way, and why he allowed sahaba to die in all the incidents we know and also in all the battles...
As it might already be clear t you, this question can be further generalized, in the form that why Allah let his good people be hurt by others, like in the case of many prophets like yaqoub had worse diseases for quite some time. Jesus was hurt by jewish. Many prophets were killed by people. And so on...
This question can further be generalized in WHY ALLAH LET BAD THINGS HAPPEN? but for now lets answer the question why Allah let his messangers or good people be hurt by others.
Allah says in quran 29/2-3:
Do people think that they will be left alone because they say:We believe,and will not be tested? And We indeed tested those who were before them. And Allah will certainly make (it) known (the truth of) those who are true,and will certainly make (it) known (the falsehood of) those who are liars, (although Allah knows all that before putting them to test).
Sometimes it is test of believers
And surely, We shall try you till We test those who strive hard (for the Cause of Allâh) and the patient ones,and We shall test your facts (i.e. the one who is a liar,and the one who is truthful).
And We cut them up on the earth into parties, (some) of them being righteous and (others) of them falling short of that, and We tried them with blessings and misfortunes
Sometimes it is to strengthen the belief of believers.
Those to whom the people said: Surely men have gathered against you, therefore fear them, but this increased their faith, and they said: Allah is sufficient for us and most excellent is the Protector.
Now, to understand by example...
From this link:
"An individual once asked Sayyid Mawdudi about why many people, despite being good and pious, or apparently innocent, suffer severe tribulations in this worldly life. What wrong could a minor child or an infant, for example, commit so that he or she should have to suffer a fatal disease or even be murdered? Why do we see many good people suffering severe afflictions and calamities that they apparently do not deserve?
Mawdudi asked him to consider a beautiful, well-kept garden and its gardener. The garden has many kinds of plants, each requiring various types of resources and care. It is well kept and healthy since the gardener meticulously takes care of it. He often clears the weeds and unnecessary plants that are harmful for the good plants. He trims branches and leaves to maintain their good health. He waters his garden when needed, or withholds water when that is harmful. It is because of such good care that his garden remains beautiful and healthy.
The weeds or plants that he removes or the leaves and branches that he trims suffer much and complains. Their instincts are reactive to their own physical needs and they have little or no understanding about their surroundings, let alone the rest of the garden. They complain about their immediate needs and sufferings and do not know what is ultimately good for even themselves, much less the entire garden. Mawdudi then asked him to compare the garden with the universe and the gardener with Allah (swt). The point was well made. The analogy, however, is simplistic, for Allah’s knowledge and wisdom is infinite compared to the finite knowledge of a gardener, and His domain is infinitely wider and more complex than a garden. In this universe where an infinite number of laws, events, variables and factors are at work, each affecting others in complex ways, it is impossible for us to comprehend the full wisdom and purpose behind what we apparently observe.
In the end i would quote some ahadith.
“The greatest reward comes with the greatest trial. When Allaah loves people, He tests them. Whoever accepts that wins His pleasure but whoever is discontent with that earns His wrath.”
Narrated by al-Tirmidhi (2396) and Ibn Maajah (4031); classed as hasan by al-Albaani in Saheeh al-Tirmidhi.
Prophet Muhammad peace be upon him said.
“How wonderful is the affair of the believer, for his affairs are all good, and this applies to no one but the believer. If something good happens to him, he is thankful for it and that is good for him. If something bad happens to him, he bears it with patience and that is good for him.” (Narrated by Muslim, 2999).
اللہ اعلم بالصواب
Allah knows best
Are you talking about this narration?
Anas bin Malik narrated - A Jewess brought a poisoned sheep for the Prophet who ate from it. She was brought to the Prophet and he was asked, "Shall we kill her?" He said, "No." I continued to see the effect of the poison on the palate of the mouth of Allah's Messenger.
Anas reported that a Jewess came to Allah's Messenger with poisoned mutton and he took of that what had been brought to him (Allah's Messenger). (When the effect of this poison were felt by him) he called for her and asked her about that, whereupon she said: I had determined to kill you. Thereupon he said: Allah will never give you the power to do it. He (the narrator) said that they (the Companion's of the Holy Prophet) said: Should we not kill her? Thereupon he said: No. He (Anas) said: I felt (the affects of this poison) on the uvula of Allah's Messenger.
The poison seemed to not do much killing. But your question is about why Allah did such and such and we can't really answer that.
Actually, we don't even know for sure if this incident happened since there is ambiguity in the chain from Sho'ba to Hisham b. Zaid to Anas