If the USA actually funded Hamas, it would definitely be illegal. But it is not illegal to fund the Palestinian Authority, and both Israel and the USA do that with the PA.
The reason why it’s illegal for the USA to fund or support Hamas is that it is officially listed in the USA as a “Foreign Terrorist Organization”. The PA is not, and both Israel and the USA have a long history of working with the PA.
Neither have ANY HISTORY of cooperation or funding or supporting Hamas in Gaza.
You’ll CONTINUE to see the funding of the Palestinian Authority by the USA and Israel, while you won’t see that at a all with Hamas in Gaza.
And just recently Egypt made a provision in the cease-fire proposals to put Abbas and the Palestinian Authority in charge of the Gaza side of the Egyptian border. Israel was okay with that provision from Egypt, as that would take Hamas away from comtrol of that border.
I’m afraid you’re way out of touch with what Israel and the USA are doing.
It is true that both Israel and the US have a long — and unfortunate — history of working with the Palestinian Authority.
It was only in late April 2014 that Hamas officially joined the Palestinian Authority to form a coalition government.
This made continued funding illegal.