It was recently revealed that the United States allowed Israel to take ammo from American stocks stored in Israel because of some shortages created by the fighting with Hamas. Allowing Israel to draw on thes American stocks is a courtesy because Israel allows the U.S. store the stuff there and helps keep it all safe. Moreover, the U.S. has to use or dispose of ammo once it exceeds its shelf life. So selling older stuff to Israel when Israel needs it helps both countries.
Since 2006 the United States has been building war reserve stocks (large quantities of ammo and spare parts needed to support intense action at the start of a war) in Israel to support possible American operations in the Middle East. The U.S. also has such stocks in the United States and during the Cold War maintained them in Europe as well. Recently the U.S. has been reducing war reserve stocks in South Korea, often selling the ammo and spares to South Korea.
Some pundits accuse the U.S. of using the war reserve stocks angle as an excuse to maintain large supplies of ammo and other military material in Israel just for the use of Israel. In practice such has not been the case. The American stocks in Israel were drawn upon by U.S. forces in Iraq and Afghanistan after 2006. Moreover Israel helped the U.S. deal with small arms ammunition shortages before and after 2006 by taking ammo from their own stocks and selling it to the Americans. All this is the sort of thing allies do for each other.