Oftentimes people try and use God as a personal genie, calling on Him when they want or need something, usually out of selfish motives. God wants to give us things and bless us, but He expects us to have the right intentions and may even reward us for it.
In 1 Kings Chapter 3 The Lord appeared to Solomon in a dream and told him He would give to him whatever he asked. Instead of asking for worldly pleasures or selfish gain King Solomon asked God for wisdom and an understanding heart to judge the people and be able to discern good from bad.
“And the speech pleased the Lord, that Solomon had asked this thing.” 1 Kings 3:10
God was pleased that Solomon did not ask for riches, a long life or the life of his enemies, but asked for understanding to discern judgement. God not only gave Solomon a wise and understanding heart, He made it so that he was wiser than any king ever before him or that would come after him. God did not stop there:
“And I have also given thee that which thou hast not asked, both riches, and honour: so that there shall not be any among the kings like unto thee all thy days. And if thou wilt walk in my ways, to keep my statutes and my commandments as thy father David did walk, then I will lengthen thy days.” 1 Kings 3:13-14
Solomon became greatly blessed for seeking after righteousness and received blessings he did not even ask for. Jesus taught us the same thing almost 1000 years after King Solomon lived and tells us that The Father already knows what we need. Jesus tells us what we should be seeking from God:
“But seek ye first the kingdom of God, and his righteousness; and all these things shall be added unto you.” Matthew 6:33
If we ask God first for wisdom, righteousness and seek for more overflow of the Holy Ghost instead of our own selfish desires our lives will be blessed. This is because we will be seeking after the Kingdom of God first. Many blessings we never even asked for will follow in our lives when we petition God the way that Solomon did.