First thing you have to understand is the anime and the games aren't the same thing. The game's logic does not apply in the Pokemon anime; think of it as an alternate version of the games. So why does Ash's Pikachu lose to weak Pokemon? It's all to keep the anime interesting.
Would the anime be interesting if Ash wrecked everything in his way with his Pikachu? I sure wouldn't think so. They make Ash lose to make it interesting, and to add movite to Ash's next fight. The fact Ash lost to Trip and not some random guy he meets is another strategic element added by the anime writers; Trip acts as Ash's rival, and Trip beating him in the first fight will justify the rivalry and make it more appealing.
I've said many times before, the anime writers care more about their audience than how logical the show is for how similar it is to the games.