The US never negotiates with “terrorists”, they fund “freedom fighters” to kill the terrorists and maybe recover some of the hostages.
Hamas likely wanted to force a confrontation in order to make it abundantly clear who’s paying for which “freedom fighters”… even if everyone knew for a long time, did very little about it, and is likely to do very little more either way.