More syntax fun

I was struck by the deep strangeness of a common phrase.

If it hadn’t been for the bible in his pocket, the shot would have killed him.

If it hadn’t been for those pesky ants, we could have enjoyed the picnic.

There are more concrete ways to say the same thing with the same words.

If the bullet hadn’t been stopped by the bible…
If the ants hadn’t been on the ground…

But hadn’t been for is far more common. What is for doing here? It seems to be more instrumental than dative, like Spanish por.