There are machine learning techniques that aim to address causal questions and there really is not restriction of machine learning to non-causal questions (such as prediction tasks) only. And suitable ML technqiues can of course be used to develop causal understanding. Any particular approach may of course not be the best approach for any particular problem.
And yes, you are right that models that primarily give you a prediction model (e.g. the standard RF, GBDT or neural networks - although why you say they are non-regression models is not clear to me, sure they don't directly fit a linear regression model, but they solve a regression objective) do not directly give you something useful for causal questions. That's because of the good old "correlation is not causation issue". E.g. if you look at who dies from a heart attack, being on medications that are intended to prevent heart attacks is a really good predictor for you dying of a heart attack. It doesn't really matter what prediction model you use, if you just dump all the information in to get a prediction model, your model will "tell" you that (even if you adjust for other recorded predictors about the patient). Of course, this doesn't mean that these drugs cause heart attacks, it means that physicians are somewhat good at identifying high risk individuals (even better than a model can usually do from other recorded predictors) and prescribe them drugs that are intended to lower their risk (but despite that, they're still at much higher risk than healthier people).
And, yes, this is a serious problem in practical work. People frequently mis-interpret such correlational things as causation. And often it's a lot less obvious than the example.
On the other hand, such primarily prediction focussed models can be used with tweaks (e.g. random forest -> causal forrest) to do causal inference, or can be one step of a larger procedure (e.g. to estimate propensity scores, to estimate a super-covariate etc.) that addresses a causal question.