It's the aftermath of the first Israeli Arab war
The second Israwl was established just about all the countries in that region attacked it right away.
Egypt, Yemen, Saudi Arabia, Lebanon, Syria, Iraq and what is now modern day Jordan all teamed up and invaded Israel. A neighborhood welcome party.
Israel won and took some buffer territory around it just in case all these countries would decide to invade it again. All those countries ended up trying to invade Israel two more times (6 day war and Yom Kipur War)
It is very unfortunate what happened to the people displaces by these wars. The Arab League shouldn't have tried to wipe Israel off the map in the first place.