The verse of the Qur'an discussing this (7:143) does not say that Moses saw Allah in the mountains. Rather, it says that IF Allah were to manifest Himself to the mountain and it were to remain standing, then Moses would see Allah. However, that does not happen; Allah unveils some aspect of His greatness before the mountain, and the mountain shatters to pieces. (It is said in hadith that the way that Allah did this was by having one of the cherubim - i.e. one of the angels - shine part of its light onto the mountain.) Also, Moses passes out. Thus, Moses understands that no one and nothing can bear seeing Allah.