These shape shifting titans built a base so that normal titans could not pose a danger to the shape shifting titans. Their goal was to wait within the walls until humans were all eliminated by the titans. This plan would allow the shape shifting titans to avoid battle with humans and thus saving them from losing lives on their already low numbers. The problem was that their hidden location was discovered by a sizable human army which could have meant the total destruction of these shape shifting titans. To avoid this, it was agreed that the shape shifting titans should stay in human form and relocate to a new location.
At the time, these shape shifting titans could not destroy the humans completely because they had well equipped and highly skilled fighters within their army. As time passed, humans began to take their titan threat less seriously so that their defense force were smaller in number and were less skilled. Sensing this weakness, the shape shifting titans decided it was the right time to attack and make an entrance for the regular titans.
Dr. Grisha Yeager is a shape shifter himself who fell in love with a non-shape shifter. Although Dr. Yeager is a shape shifter, he did not share the hate that his fellow shape shifters had for humanity. This is evident when he cured a plague that was befalling humanity. After the attacks on wall rose which he was not notified beforehand, he injected his son with the shape shifting potion so that he would not die as easily as his wife did.
After the initial attacks, Dr. Kichirou Moto sent in spies into the human military to analyze human tactics, weapons, and military numbers. Feeling confident that humanity was still not prepared to engage the titans, a second and third attack were planned on walls maria and sina.
The attack on wall sina failed due to a change of heart from a handful of shape shifting spies who changed sides.