"And the people quarreled with Moses" (Exodus 17:2) - that they overstepped the line of justice. "And Moses said to them, Why do you quarrel with me? Why do you test the LORD?" He said to them: As long as you contend against me, behold, you are testing the Holy One, blessed be He. Another interpretation: He said to them, As long as you contend against me, the Holy One, blessed be He, performs for you miracles and mighty acts, and His name is magnified in the world.
Why Do You Quarrel With Me and Test the LORD
Mekhilta DeRabbi Shimon Ben Yochai 17:2
וירב העם עם משה שעברו על שורת הדין: ויאמר אליהם משה מה תריבון עמדי מה תנסון את ה'. אמר להם כל זמן שאתם מידיינין כנגדי הרי אתם מנסים את המקום: ד"א אמר להם כל זמן שאתם מדיינין כנגדי המקום עושה לכם נסים וגבורות ושמו מתגדל בעולם: