Joint probabilistic modelling of images and non-imaging covariates: a causal perspective