From What Ifs to Insights: Counterfactuals in Causal Inference vs. Explainable AI