What does "in" do here? How come "in" is necessary here?
Good question. No, "in" is not necessary to use here and sounds a little bit awkward. He most likely meant to say "as an apology" instead because this is more usual. However, he could have been using "in" to describe the purpose or way by which he gives him something, which is in the form of an apology. However this would still sound weird because he would have omitted "the form" in this case. So it is best not to use "in" in this context and use "as" instead here.