There is a couple of ways Lopunny’s improves when it Mega-Evolves: Since it gains Scrappy as an ability, it can hit ghost-type Pokémon with powerful normal and fighting type moves.  Its speed, attack, and defense all increase when it Mega-Evolves.  With stab moves and an increase in attack, you can do bug damage with normal-type moves (Return) and fighting-type moves (High Jump Kick) since Lopunny gains fighting as a type when it evolves.