// The case before mine was a guy appearing for the second time because the first time they got his name wrong. They also got it wrong this time. //
How did that prevent the case proceeding? It's a simple matter to amend any details of the charge (including the name of the accused) in court on the day of the hearing (in fact, right up to the closure of the prosecution's case). Provided the Magistrates are satisfied that the person in the dock is the person the prosecution say he is, that's all that matters.
//Surely any decent magistrate would criticise the police and dismiss the case,...//
Magistrates do not have the power to "dismiss the case". Only the prosecutor can withdraw the matter (with the court's agreement). If the prosecutor insists on continuing, it must be heard.
Whoever got the defendant's name wrong it was not the Magistrates. They don't provide the details, they only hear the details that are put before them.