The ruling by the Supreme Court of the United States has nothing to do with the friendship between U.S. and Israel. It is strictly an issue of American Constitutional law.
Whereby; The President of the U.S. calls the shots on American foreign policy and not the Senate and Congress.
If you review history previous American Presidents decision were similar.
There is an American legal decision that is as stated below:
"President Barack Obama on Wednesday issued a routine block to a 20-year old congressional effort to move the U.S. embassy in Israel from Tel Aviv to Jerusalem. But two decades of stalling on the relocation could soon end if the 2016 GOP candidates have their way.
Every six months, Obama sends the same memo to the secretary of state, stating the need to delay the move in order to “protect the national security interests of the United States.” The biannual letter is necessary because a law passed by Congress in 1995 requires the American embassy to be moved to the disputed city of Jerusalem by May 31, 1999.
The bill also declared that the U.S. government supported the recognition of Jerusalem as an undivided city and the capital of Israel. Congress threatened to withhold half of the State Department’s funding for “acquisition and maintenance of buildings abroad” if the Jerusalem-based embassy did not open by 1999.
The Jerusalem Embassy Act of 1995 is a public law of the United States passed by the 104th Congress on October 23, 1995. It was passed for the purposes of initiating and funding the relocation of the Embassy of the United States in Israel from Tel Aviv to Jerusalem, no later than May 31, 1999.
Our government has three branches. Imagine a triangle. At the top is the Executive Branch. The two bottom corners are the Judicial Branch and the Legislative Branch.
In conclusion. Israel as a sovereign nation has the duty and obligation to defend and protect its people no matter what the world nations say or do.
The World stood idle while over 6 million Jews - men, women and children were exterminated by the Nazis in WW2 and their assets stolen.
The world also stood idle while Arab countries persecuted and expelled over a million Jewish families from their countries (Jews who have lived in those Arab countries for over 2,200), confiscated their personal assets, businesses, homes and Real property (120,440 sq. km. or 75,000 sq. mi. which is 5-6 times the size of Israel, these properties are valued today in the trillion of dollars). Majority of the Jews expelled from Arab countries were resettled in liberated Greater Israel.