To complain is to challenge God's authority in your life. When your focus is elsewhere, on how good someone else has it, or how hard your path is, you are no longer working to make progress on your own path. You begin to desire what others have, and this leads to covetousness.
When Peter saw him, he said to Jesus, “Lord, what about this man?” Jesus said to him, “If it is my will that he remain until I come, what is that to you? You follow me!” So the saying spread abroad among the brothers that this disciple was not to die; yet Jesus did not say to him that he was not to die, but, “If it is my will that he remain until I come, what is that to you?” (John 21:21-23, ESV)
When we complain about our circumstances we are saying, "God, i do not like how You are leading me. I know better than You." And this is a dangerous place to be. Job experienced this first hand, and the book in thethat chronicles his trials has page upon page of him proclaiming his innocence, and how he would challenge God that what he was going through was unfair. His friends were not of much comfort either. Only one of them (Elihu) extolled the virtues and character of God, and as a result, he was the only one not rebuked by God. God's response?
Then the Lord answered Job out of the whirlwind and said: Who is this that darkens counsel by words without knowledge? Dress for action like a man; will question you, and you make it known to me. Where were you when I laid the foundation of the earth? Tell me, if you have understanding. Who determined its measurements—surely you know! Or who stretched the line upon it? (Job 38:1-5, ESV)
God continues to address Job for two chapters before Job is given a chance to respond. These were his words:
Behold, I am of small account; what shall I answer you? I lay my hand on my mouth. I have spoken once, and I will not answer; twice, but I will proceed no further. (Job 40:4-5, ESV)
But God is still not finished:
Then the Lord answered Job out of the whirlwind and said: Dress for action like a man; I will question you, and you make it known to me. Will you even put me in the wrong? Will you condemn me that you may be in the right? Have you an arm like God, and can you thunder with a voice like his? “Adorn yourself with majesty and dignity; clothe yourself with glory and splendor. Pour out the overflowings of your anger, and look on everyone who is proud and abase him. Look on everyone who is proud and bring him low and tread down the wicked where they stand. Hide them all in the dust together; bind their faces in the world below. Then will I also acknowledge to you that your own right hand can save you. (Job 40:6-14, ESV)
How can one think about even trying to respond, and yet God said so much more to Job when he addressed his concerns. Since God considered Job a righteous man, and even went so far as to draw Satan's attention to the man, and then allowto do what he did, i do not want to imagine how my dressing down would go.
In the end, if we claim to be followers of Jesus, our complete and utter trust is in Him, and our reward will be to be with Him in Heaven. He is perfect and just.