It was revealed in Jigen’s backstory that the Otsutsuki members will always come in pairs while harvesting a God Tree. In order for the God Tree to bloom, they must sacrifice an Ostutsuki, which is usually the weaker of the pair. Kaguya is considered to be weaker than Jigen, so she was selected to be the one sacrificed. Kaguya never underestimated Jigen and other Otsutsuki. The reason why she cast the Infinite Tsukoyomi is to build an army of White Zetsu in preparation for an incoming Otsutsuki attack.