One could argue the protective enchantments had fallen, or that the Malfoys had one wand between the 3 of them.
They are all seen at the battle, they need to be seen clearly leaving it. If you saw them disapparate, it is not clear why or where they go. They could be taking up flanking positions. By walking away, they are making a clear statement to the Order that they are no longer involved with Voldemort. J.K. Rowling indicated on Pottermore and in interviews that the Malfoys do not get imprisoned after the war. Part of why they were free was because they helped Harry (Draco at the Manor, Narcissa in the forest). All 3 were seen at the final battle, in order to secure a good defense they need to leave in a fashion that shows the Order that they are not loyal to Voldemort (who is facing the other direction). They can say that they only came to Hogwarts to find Draco and ensure his safe return home. Also remember that up until this point, Lucius has done nothing to help Harry, but he is left with a choice between following his family or staying to fight. That, combined with his testimony against the Death Eaters after the war secures his freedom.