Should predictive analysis be tackled with causal inference in mind? Say I am trying to predict depression from anxiety. I collect data and build a MLE and obtain r=0.9. To me, this is great, so I push the model to production. 4 months later, I realise that the "rate of unemployment" is a confounder that plays on both variables.
I conclude that I should not merely look at correlation, but rather tackle predictive analysis from a causal inference perspective.
However, when learning about predictive analysis, I rarely see mention of causal inference. It is often just about "finding the best model to fit your model".
 A: As Vladimir mentions, the answer is "it depends". If you build a well-calibrated correlational (i.e., predictive) model on units randomly sampled from your population, then that model should generalize to other members of the population. If you have a model of depression and anxiety, then applying that model to other units in the population will be accurate. The fact that there are confounding variables says nothing about the validity or generalizability of the model results (to the same population).
For example, if you calibrate a model well to predict depression participants' reported anxiety, the fact that there are confounders of that relationship doesn't affect the quality of the prediction when applied to new data. Of course, the presence of a confounder implies that there is a variable predictive of the outcome that you are missing, in which case your predictions would be improved if you included it in your model (the same as any prognostic variable).
Where you need causal inference is when you want to predict outcomes after (hypothetically) manipulating a feature. For example, if you manipulate participants' anxiety by giving them an anti-anxiety medication, your previous model for depression is no longer valid because the outcome and feature are confounded in the original data. Your model would need to account for all confounding factors and not condition on any confounding-inducing variables to be able to predict the outcome without bias. You need a statistical theory of causal inference to tell you which features to include and exclude in your model to arrive at an unbiased model for the outcome given manipulation of the treatment.
A: First of all, you shoud have in mind that the estimation of causal effects and prediction are not the same thing. The amount of consumption of chocolate in a country might help you to predict from which country the next Nobel laureate in medicine will come from, but it will not tell you that much about the causal "story" that produces nobel laureates in some countries (probably that story has something to do with economic growth).
To your question:
Yes, if ...
...you want to generalize your results to new environments, $e$ . Causal relationships of the kind $X^{e} \rightarrow Y^{e}$ should go along with so called invariant conditional distributions $P(Y^{e} |X^{e})$, which are the same for all environments $e\in \mathcal{E}$ from some environment space $\mathcal{E}$. So having $X^{e}$ in your model when predicting $Y^{e}$ should improve the robustness of your predictions when dealing with different environments. An example from this book Ref1: let $X^{e}$ be the height of a mountain and $Y^{e}$ the temperature measured at a certain height. So you might deduce from some physical theory that there is something like a causal relation between height and temperature ("the higher, the colder"). This relationship should hold between different environments, such as the Swiss and the Austrian Alps. Hence your prediction model built on data from the Swiss Alps should also hold for the Austrian Alps (robust prediction). See this great article here: Ref2. Or this nice talk: Ref3.
No, if ...
... you are just interested in the predictive performance of your model based on your training data (one environment).
