I don't know the background, but I suppose an order was sent out to all units of the army to hand in lists of their soldiers who had participated in the battle.
As between the date of the battle and the call for the names some time had passed, so some soldiers had been transferred to the/a garrison battalion and were listed under this heading, when the commander of the garrsion battalion sent in their name.
Some regiments didn't want their ex-members lose the medal, so they named them, too. Or they just used a preserved roll call of June 18 for their lists, without checking.
Just an idea,