The Sun Harvester is a gigantic Energon harvesting machine that destroys suns and turns them into Energon (The life blood of the entire Transformer race).
In ancient times, the Dynasty of Primes, 7 leaders of the Transformer race from the planet Cybertron sought to preserve their race by finding a sun capable of providing the Energon to power the Allspark and the only way to turn on the machine is by using the Matrix of Leadership. They found a planet called, Earth to build the Sun Harvester to destroy the sun but were told not to turn on the machine if any planet is inhabitable (such as Earth). However, one of the Primes called, "The Fallen", who became the first Decepticon leader and founder, started hating the human race and threatens to turn it on. In the battle, the 6 Primes fought to reach The Fallen to prevent him from activating the Harvester.
So they have no choice, but to steal it and hide it from him.