When doing an A/B test or RCT, the objective is to establish a causal link between the treatment and the outcome using experiment. At times, it is not possible to perform experiments for empirical results so, observational data can be used.
The problem is that only one possible outcome would have happened thus it is necessary to create a counterfactual alternative that can be matched with the actual outcome. So a counterfactual contrast is basically a dreamed-up hypothetical alternate event.
For example: A parameter (such as a disease frequency) that describes events under actual conditions is said to be actual (or factual); in contrast, a parameter that describes events under a hypothetical alternative to actual conditions is said to be counterfactual.