The US and Israel are not punishing Gaza because they elected Hamas. Hamas is of the opinion that they are entitled to international financial aid to support their war against Israel and Israeli support through the transfer of taxes and transportation of goods. No other country ever had such expectations during a time of war. If Hamas wants to make war, they are on their own to get support from Iran and other supporters. There just is no reason that Israel and the rest of the world should support them.
Yemen's Houthi rebels commit to peace plan in letter to UN chief, BBC reports (Haaretz)
from the article: The mysteries of American logic