Apologising for having done it implies that under similar circumstances he wouldn't do it again, which of course he would.
I absolutely loathe these false apologies. It's all too easy these days for a teacher with responsibility for discipline to bring a child to apologise for what they have done. On the occasion that children have been brought to me by someone senior in order to apologise for their behaviour, the child, and very often the teacher, are shocked by my response.
"Do you know what an apology is? Do you? Do you?"
No response.
"OK, I'll tell you. An apology is an expression of sorrow, of regret, for having done something that you know is wrong and a promise that you will try to improve in the future. How many times this term have you apologised to someone for exactly the behaviour for which you are now apologising to me?"
Look of shock and horror on face of child, squirming by teacher.
"Your silence tells me that it's more than once. That means that your apologies mean nothing at all and if you apologise without it meaning anything, what does that make you?"
No response.
"If you apologise without meaning it, that makes you a liar, doesn't it?"
Look of shock on teacher's face now matches look of horror on child's. You aren't suppose to talk to children in this manner.