Ratchet was the most ineffectual medic ever. He couldn't fix Jazz. He couldn't even fix Bumblebee (something that Cade and TWO little girls could do). I don't think Ratchet had ever been shown actually repairing any transformer, in any of the movies.
Therefore, Ratchet was secretly a decepticon agent sabotaging the autobots by keeping them damaged!