In the Midrash Tanh`uma(Siman 7) it speaks about the daughters of Ts'lafh`ad complaining to Moshe about their father's land.
If they wouldn't have complained would have they gotten the land?
A brief Mashal (parable).
A man goes to the doctor with NO money (very sick), complains and wines, and finally after a while the doctors gives in to treat him.
The next man goes in with a similar illness, and has a little amount of money- about a fourth of the money he needs. The doctors refuses him, and the man leaves.
We see from this complaining- that we must put effort in to what we do.
"HaLomed Torah MeOni Sofo LiLomadah MeOsher- one who leans Torah from poorness, he will end up leaning it from wealth."(Prikei Avot)
The commentaries explain it to mean with "poorness- to be poor in knowledge", and "wealth- to mean being wealthy in knowledge".
Effort is very important, especially for Torah!