Paul Marchant admitted he had made an "error of judgement" as he resigned as Primark CEO.