Look at verse 20 of chapter 20: 'Moses said to the people, 'Do not fear; for God has come to test you, and that His fear may be before you, so that you may not sin''.
20:20 Markaasaa Muuse wuxuu dadkii ku yidhi, Ha cabsanina, waayo, Ilaah wuxuu u yimid inuu idin tijaabiyo, iyo in kacabsashadiisu idinku jirto, si aydnaan u dembaabin.