Stephen Gowans' excellent new book entitled Israel: A beachhead in the Middle East reveals the context of the wider post WWII by the European nations and the USA to resist the efforts of the more independent Arab countries to possess and manage their own valuable oil and gas resources for the benefit of their countries instead of serving the British, American, and other European investors.
This Six-Day War was a crucial war that led to the decisive crushing of the influence of Gamal Nasser, President of Egypt, who became a hero to the Arabs who struggled to gain control of their oil from the colonial powers and the Americans. As such, the brief war also cemented the support by US capitalists in the emerging US Empire for Zionist Israel.
As Gowans revealed in his heavily documented book:
In March 1967, tensions grew between Syria and Israel over their demilitarized zone separating the two states. The Soviets warned Nasser that Israel was preparing an attack on his ally. In April, the Jordanians and Saudis, taking their instruction from the CIA, accused Nasser of cowardice. He talked big, they said, but his inaction belied his words. He was nothing but a paper tiger. Their intention was to goad the Arab leader into attacking Israel, or lose face before his adoring Arab supporters if the didn't.Nasser built up his troops near the border between Israel and Egypt, and the Israelis went on the attack. The USS Liberty, equipped with power intelligence capabilities, was stationed near the battle-zone to monitor what was going. When the Israeli Army, equipped by the Western powers, launched their attack on nearby Arab countries and were decisive in their quick victory over the poorly equipped Arab nations like Egypt and Syria, the USS Liberty was a liability--they knew too much--and had to be destroyed by Israel. The directors of the emerging US Empire immediately recognized the value of Israel in helping to put down any resistance to their control of the valuable resources of the Middle East. And, as they say, the rest is history.
For an accurate description of the attempted sinking of the USS Liberty by the Israeli Air Force, I recommend my post from 2017 entitled Remembering the USS Liberty.