I was battleing a trainer in Pearl when they sent out Pachirisu. Somehow the Pachirisu knew Spark at level 12 but my one wich is also level 12 did not. After that battle I carried on and my Pachirisu grew a level and learnt Spark.
I don't understand.
That's just how it is in the game sometimes. Opponent's Pokemon could know moves that they learn at higher level before they actually reach that level. Hope I helped!