If you detect a correlation between A and B only three possibilities exist:
Only the first case is true correlation, but from the above graphic it is evident that also cases 2 and 3 allow to analyse the structure of data, once the factors C and D are discovered.
Case 2 is spurious correlation. But if you find C you have a model.
Case 3 is indirect correlation. In this case A and B are proxies or indicators of C and D, and can be used interchangeably. Often A and B are easier to measure than C and D.
It has been observed a drop in explanatory power in ecological studies in recent year. This is probably because we don't take into account the above very general patterns.
Structural Equation Models (SEM) allow to study the three cases, but unfortunately they can deal only with linear relationships.