Since not all of them were of age, they couldn’t apparate to the castle’s gates themselves. Ans although they were Slytherins, Professor Snape had said he’d only give his consent if he did not have to play the babysitter himself. Therefore, McGonagle had gotten the role of making sure the students came back safely.