Why was palestine divided?

Many factors come into this issue, I suppose, but it all started after the British mandate over Palestine was dissolved after WWII. Britain divided the land up because it had promised the entire country to both the Palestinians (in the Peel commission) and also to the Israelis (Balfour Agreement). This was due to the roles Britain wanted both to play in the Second World War, as by giving the land to the Palestinians, they would be more able to dissolve the Ottoman Empire which was fighting on the Axis side, and thus eliminate one opponent. However, they also wanted to favour the Israelis because of the Jewish influence in America, and by engaging America in the war, they would win it (otherwise, not). That is the history behind why there was a split.
After the Partition, the country was split between Israel, a single continuous stretch of land; and Palestine, split between the Gaza strip and the West Bank (of the Jordan, in case you were wondering). This partition was refuted and war soon broke out, and the post-war borders moved in the '48 war. They were later to move again in the '67 war. The city of Jerusalem was an 'International City' i.e. nobody owned it. This was an attempt to solve the disputes.