Simply put, they didn’t. The UK controlled Mandatory Palestine from 1920 until 1948. Over those 28 years there was massive unrest and regular violent conflicts between the Palestinians, the Jews, and the British resulting in tens of thousands of deaths. The violence had a variety of causes, including struggles against colonial overlords, religious and racial animosity, and economic and political fears.
Jewish and Palestinian communities formed paramilitary forces, ostensively for self-defense but which also engaged in extended violence against civilians. On the Jewish side some of the most prominent of these were the Haganah, the Lehi, and the Irgun, while on the Palestinian side the some of the most prominent were the Army of Holy War, the Arab Liberation Army, and the Arab Legion. These organizations engaged in regular fighting with each other, other citizens of Mandate Palestine, and with the British government.
The causes of individual riots and attacks varied. While some were deliberate attacks against civilians, others were caused by protests spiraling out of control, rumors of instigating attacks, and the general air of suspicion. An example of this would be the 1921 Jaffa Riots, a week of violent riots that resulted in 95 deaths and another 200 or so injuries. The events began when rival Communist Jewish groups held parade to celebrate May Day. The parades met, and a fist fight broke out. British police officers attempted to break up the fight, and pro-communist Christians and Muslims began to attack the police. The fight spiraled out of control, and (incorrect) rumors about Jews attacking Palestinians spread through the city. Palestinians in other sectors of Jaffa and Tel Aviv decided to launch a preemptive attack, and the situation went from being a minor riot to a major crisis. The British declared marshal law, brought in reinforcements from Egypt, and even dropped bombs in an attempt to get the situation under control. The riots destroyed hundreds of Jewish homes and businesses, and thousands of Jews fled Jaffa to live in tents on the beach in Tel Aviv.
Other times, the attacks were more deliberate. On July 22, 1946 the Jewish terrorist group Irgun bombed the King David Hotel in Jerusalem. 91 people died and another 46 were injured in one of the most lethal terrorist attacks of the 20th century. The hotel housed the British administrative headquarters for Palestine and was attacked in retaliation for “Operation Agatha,” the arrest of thousands of Jewish partisans the previous month.
Events like these were commonplace, with major intracommunal violence happening every year. By the end of the time period the region had completely melted down in a series of armed conflicts that the British were more than happy to leave behind when they evacuated in 1948. From 1936 until 1939 and then again from 1947 to 1949 there was near-constant violence, beginning with the Arab revolt against British colonial rule and concluding with the State of Israel establishing itself and defeating the joint forces of Egypt, Transjordan, Iraq, Syria, and Lebanon. In that time period alone, 20,000 - 30,000 people were killed and estimates for the number of refugees are as high as two million. A significant portion of these people and their descendants are still refugees in Arab counties bordering Israel, though many of them integrated into life in Jordan or the West Bank.
The break in the violence was caused by the outbreak of World War 2. Both Palestinian and Jewish forces agreed to a ceasefire for the duration of World War 2, viewing Nazism as a greater threat. Many militants join the Allies in WW2, and the Haganah set up a smuggling route to bring Holocaust refugees out of Nazi-controlled lands and into the Middle East. While there was occasional intracommunal violence during World War 2, large scale fighting did not resume until the United Nations Special Committee on Palestine approves a partition plan to establish two states in Mandate Palestine in November 1947.
When organized violence did occur during WW2, it was with an awareness of the context of the war. For example, the Lehi and Irgun resumed operations towards the end of WW2 but made a policy of attacking only British civil targets (such as the aforementioned King David Hotel) rather than military targets to not impede the war effort. This attitude was shared by civilians as well: at one point during the war Nazis sent commandos to Palestine to try to spread unrest in Palestine, but they were rebuffed by local Palestinians they were trying to radicalize and arrested by the British.