The Origin of causal set structure in the quantum universe