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".

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).
