As L&S put it, in their classic textwall style (entry for in, II.C.2):
Of the object or end in view, regarded also as the motive of action or effect: “non te in me illiberalem, sed me in se neglegentem putabit,” Cic. Fam. 13, 1, 16: “neglegentior in patrem,” Just. 32, 3, 1: “in quem omnes intenderat curas,” Curt. 3, 1, 21: “quos ardere in proelia vidi,” Verg. A. 2, 347: “in bellum ardentes,” Manil. 4, 220: “nutante in fugam exercitu,” Flor. 3, 10, 4: “in hanc tam opimam mercedem agite ( = ut eam vobis paretis, Weissenb. ad loc.),” Liv. 21, 43, 7: “certa praemia, in quorum spem pugnarent,” id. 21, 45, 4: “in id sors dejecta,” id. 21, 42, 2: “in id fide accepta,” id. 28, 17, 9: “in spem pacis solutis animis,” id. 6, 11, 5 et saep.: “ingrata misero vita ducenda est in hoc, ut, etc.,” Hor. Epod. 17, 63: “nec in hoc adhibetur, ut, etc.,” Sen. Ep. 16, 3: “alius non in hoc, ut offenderet, facit, id. de Ira, 2, 26, 3: in quod tum missi?” Just. 38, 3, 4.—So, like ad, with words expressing affections or inclination of the mind: “in obsequium plus aequo pronus,” Hor. Ep. 1, 18, 10: “paratus in res novas,” Tac. H. 4, 32: “in utrumque paratus,” Verg. A. 2, 61.—
In other words, in + accusative can indicate the purpose or goal of an action, when that purpose or goal is a single noun (as opposed to a whole phrase, which takes ut). In this case, the goal is remembrance (memoria) of the deceased.
This construction is used to similar effect in one of the most famous Bible passages, Luke 22:19 (emphasis mine):
Et accepto pane gratias egit, et fregit, et dedit eis, dicens: Hoc est corpus meum, quod pro vobis datur: hoc facite in meam commemorationem.
And when Jesus had taken the bread, he gave thanks, and broke it, and gave it to them, saying: This is my body, which is given for you: do this in remembrance of me.
The same construction is found in the Greek here, using εἰς ("into") with the accusative to indicate purpose or goal. I'm not sure if the Greek usage influenced the Latin one or not, though that might make an excellent question of its own!