Evolution of band structures in MoS2-based homo- and heterobilayers