I don’t get Hamas’ military strategy

If I had ordered the building of cross border attack tunnels, where there was an attempt to put them to use (see here Wikipedia). I certainly wouldn’t start firing missiles early to get the IDF wound up. Now Shin Bet was aware of these tunnels, so Hamas gave the IDF good reason to deal with the problem.

Hmmm! Hamas seemed to start the ball rolling a bit early.