One of the primary financial backers of Hamas over the years has been
Israel. They propped it up and supported it to maintain some level of control among the various factions of Palestinian leadership (PLO, Palestinian Authority, etc.).
And historically, Hamas has been a Sunni Islamic faction, not Shi'ite.