How did someone like Daniel get put in a position where he was able to interpret the dreams of King Nebuchadnezzar? And how did Daniel receive the wisdom to do so?
Why did God anoint a king like David and have His favor poured out on the generations after him, but remove the crown from Saul?
Let's look at a couple key verses that show the character of both Daniel and David.
Right before Daniel tells King Nebuchadnezzar his dream interpretation he says this:
"But as for me, this secret has not been revealed to me because I have more wisdom than anyone living, but for our sakes who make known the interpretation to the king, and that you may know the thoughts of your heart." (Daniel 2:30)
Daniel humbles himself before God and the King. He makes it clear the reason he received the wisdom of the dream wasn't because he had any more wisdom than anyone else, but to save the people and glorify God.
God is looking for humble servants who are willing to give Him all the glory.
In Psalm 16:2, David says:
O my soul, you have said to the Lord,
“You are my Lord,
My goodness is nothing apart from You.”
David knows that he has nothing good other than the Lord. That God is his everything. David understood the condition of his sin and the grace of His God.
David was willing to glorify God because He knew that whatever giant stood in His way, God would deliver and preserve his life for His glory.