From the same article:
A security source emphasized that the forces confirmed there were no hostages in the facility prior to the strike. Based on Israeli intelligence, several senior Hamas figures were present at the site that was bombed. According to Palestinian reports, the attack resulted in seven fatalities and 30 injuries.
The joint IDF and Shin Bet statement asserted: "The terrorist organization Hamas continues to use hospitals in the Gaza Strip for terrorist purposes, cynically and cruelly exploiting the civilian population inside and around the hospital. Prior to and during the strike, measures were taken to minimize the risk to civilians, including the use of precise munitions, aerial surveillance, and additional intelligence information. IDF and Shin Bet will continue to act forcefully against the Hamas terrorist organization and eliminate any threats to the citizens of the State of Israel."
Sounds like the Israel military got a tip off. Hamas security leaking like a colander, to paraphrase Ted in Line of Duty.