I was thinking about "The Unreasonable Effectiveness of Mathematics in the Natural Sciences" and I realized all the mathematics I know about in science are compatible with ZF (even if they sometimes take additional axioms). So if I'm correctly understanding the situation the question becomes "why did Zermelo and Fraenkel construct a set of axioms that are useful in the real world", which seems to have a much simpler answer.
However, I'm assuming that ZF is actually what's useful here. However, if there are theorems that are really useful in science but are incompatible with ZF then it starts to look more like mathematics is generally useful.
Also, I get there are other systems that can construct many, maybe all of the useful theorems in science, but that doesn't really change the motivation for my question.