Recent observations reveal that, at a given stellar mass, blue galaxies tend to live in haloes with lower mass while red galaxies live in more massive host haloes. The physical driver behind this is still unclear because theoretical models predict that, at the same halo mass, galaxies with high stellar masses tend to live in early-formed haloes which naively leads to an opposite trend. Here, we show that the {sc Simba} simulation quantitatively reproduces the colour bimodality in SHMR and reveals an inverse relationship between halo formation time and galaxy transition time. It suggests that the origin of this bimodality is rooted in the intrinsic variations of the cold gas content due to halo assembly bias. {sc Simba}s SHMR bimodality quantitatively relies on two aspects of its input physics: (1) Jet-mode AGN feedback, which quenches galaxies and sets the qualitative trend; and (2) X-ray AGN feedback, which fully quenches galaxies and yields better agreement with observations. The interplay between the growth of cold gas and the AGN quenching in {sc Simba} results in the observed SHMR bimodality.