One of the main principles of the UN was to end colonialism. That was what Nazism, Italian Fascism and Japanese expansionism was all about: colonizing vulnerable parts of the world. The Ottoman Empire was divvied up so that the French got Syria and Lebanon, and the British got Iraq, Jordan and Palestine.
Iraq had oil. Palestine was a headache of the Brits and they were happy to turn it over to the UN. Years before, the British PM. Lord Balfour decided that the Jews somehow deserved a chunk of Palestine because, you know, the Bible. It would have made better logical sense to award them a chunk of Germany and Austria after WWII. So the Brits hung onto Iraq and Jordan as sort of protectorates, but withdrew speedily from Palisrael.
The Palestinians never agreed to ceding any territory to the Jews. They were disunited, as a large number of Palestinians were Christians in 1947, and there was no unity among them. The Arab countries that said they would defend the Palestinians were disorganized, incompetent and corrupt.
There were plenty of leftover weapons available, and the Brits and others did all they could to see that they ended up in Jewish hands.
There are hundreds of accurate books written about this, and silly Mark has read nary a one.