Although Mac2 had stripped Rufus of his memory of the past year, it had been gradually seeping back after his hostile interview with Twigg. He'd gone along with being shipped out to MI6 because it seemed better than hearing Twigg's lies again. When he had got to MI6 though, more than a mere recollection of the previous year's events had returned. He realised that if Twigg was right he would be in for a lengthy prison term.
Sitting in the MI6 flat, he needed a friend. That would be Mac2.
Its act of friendship was complete restoration of Rufus's memory.