Doctor Robotnik made Heavy and Bomb to seek and repair damaged systems. They were powered by special power gems which wound up giving them independent thought. They ran away after they heard his plan to capturing the Freedom Fighters and stole some experimental weapons. This helped the Chaotix to rescue the Freedom Fighters.
Reprogrammed
When the Acorn Secret Service was captured, Robotnik reprogrammed Heavy to kill King Acorn. Sonic was forced to destroy him to stop the army of Bombs from exploding.
Robotnik later created a new, indestructible and unstoppable version of Heavy who unleashed an army of Bombs at one of Mina Mongoose‘s concerts in an attempt to assassinate her. When the Bombs failed their mission, Heavy himself entered the fray and nearly slaughtered Mina. Luckily, Sonic was able to lure him deep underground where they both ended up being sucked into the ocean. Heavy floated to the bottom where he has remained trapped ever since.