Trains and large trucks use this setup because a mechanical gearbox would need to be enormous to withstand torques they produce. Bikes don't experience even moderate torques so they can be equipped with 10-20 geared transmissions, which weight under 1 kg.