It's a WILD and BASELESS speculation. Why would we need to explain... you know what, never mind.
Here's why. The Skrull WANTS to end life on earth to make way for Skrull colonization. You see unlike the nice skrulls from Captain Marvel, this Skrull works for the evil skrulls that want to colonize earth. However, when they super-skrulled him up, he ended up with powers over Magic which have all kinds of dumb rules they didn't account for. Why oh why couldn't he just get Thor powers or Giant-man powers. Why did he have to end up with ridiculous Dr. Strange powers.
He tried casting a spell to destroy all life and it didn't work. But he figured out he needs a focus, a well-meaning shlub to make an ill-conceived wish that can power the magic.
So when Peter comes asking for a simple "make everyone forget" spell he realizes this is a chance to use Peter as the focus for this spell.
As an aside, this also allows him to pass the buck, the shift the blame. So that when anyone comes looking for who did this terrible thing, he can point them to Peter instead of himself.
So he starts casting the spell but the Peter starts interrupting. The Skrull didn't anticipate that he focus could affect the spell JUST BY TALKING. If only he understood these whack dumb powers better. So at the end it DOESN'T wipe out all the humans, just does something else stupid. Rips open space time and dumps a bunch of multiversal garbage into the world.
There. That's why. That's your answer.