Accident? We originally constructed math specifically so it would relate to reality and be a useful tool. Even "pure math" topics have trouble shedding that legacy & foundation completely, which is why I think it's weird that people are surprised when, sometimes, those fields still end up relating to reality in ways we hadn't expected. It'd be surprising if they didn't!