The Pokemon anime is not always consistent with the games, and this is most likely one of those errors. For instance, another error could be Ash's Pikachu using Thunderbolt (an Electric Type Move) on a Golem (a ground type Pokemon which is obviously immune) which then faints. As just demonstrated, the Anime is not always consistent with the games and I reckon that this is another error. Also:
"In Pokemon, "speed" measures how quickly a Pokemon can react to a trainer's commands, and not always how fast it is. For example, trains and airplanes in real life can move very fast but take a long time to respond to things. Maybe Dunsparce has a low speed stat because it's like a train."
Credits to sumwun for the quote!