How is it possible that Moshe Rabenu the greatest of people should question Hashem?Hashem , why did it get worse for the Jewish people? The answer is that the Jews left Mitzraim in the merit of their belief in Hashem and that needed to be cultivated and brought out especially those who were struggling with their Emunah , and had questions. So , it is Moshe Rabeinu, the leader of the generation, the faithful shepherd that helps him cultivate and bring out Emunah by questioning and asking Hashem, although on his level, he was questioning it in a much deeper way to understand Hashem and get closer to him, but he framed it this way so even the person who is actually questioning and struggling, should be included and helped, to bring out and cultivate his belief in Hashem
לקו״ש טז