While Shri Krishna was a child He performed many pastimes just as a human child does. We all know how little children lie when they are asked if they have done something bad or wrong. So also Shri Krishna lied when mother Yashoda asked Him if He had eaten soil:
Lord Śrī Kṛṣṇa replied: My dear mother, I have never eaten dirt. All My friends complaining against Me are liars. If you think they are being truthful, you can directly look into My mouth and examine it. [SB - 10.8.35 ]
So to prove His point when He opened His mouth mother Yashoda saw the whole universe inside it. She realized the divinity of Shri Krishna and forgetting the soil eating incident, surrendered to Him mentally (SB - 10.8.41).
However, after knowing Shri Krishna was the Lord of the universe, mother Yashoda could never have treated Him like a son and show her affection towards Him. So lord's internal potency Yogamaya made her forget about Shri Krishna's divinity:
Mother Yaśodā, by the grace of the Lord, could understand the real truth. But then again, the supreme master, by the influence of the internal potency, Yoga-māyā, inspired her to become absorbed in intense maternal affection for her son. [SB - 10.8.43]
Immediately forgetting Yoga-māyā’s illusion that Kṛṣṇa had shown the universal form within His mouth, mother Yaśodā took her son on her lap as before, feeling increased affection in her heart for her transcendental child. [SB - 10.8.44]
So mother Yashoda considered, loved and treated Him just as her son instead of revering Him as God even after that incident. Even if it was not a normal act to do so, Shri Krishna performed it as a playful pastime. Moreover, not even a minor action of Shri Krishna is normal. All His actions are divine however significant or insignificant they may seem:
janma karma ca me divyam [BG - 4.9]
- My birth and my actions are divine.