In everything, therefore, treat people the same way you want them to treat you, for this is the Law and the Prophets.
This verse is not only a good summation of the entire Old Testament, but it is also summarizes the message of the Sermon on the Mount. So why does Jesus suggest this thought after sharing on the value of asking God for things?
Man was made at the pinnacle of creation in God's image to reflect the glory of God. The great irony of this, however, is that man is the only part of God's creation that does not by nature give God glory. In order to restore our calling to reflect God's glory we need to look like Him.
Throughout the Sermon on the Mount, Jesus challenges His disciples to be like God: make peace like God (5:9), love enemies like God (), do good in secret like God (6:2-6, 18), forgive debts like God ( ). In Matthew Jesus tells us to give to all who ask. In Matthew Jesus shows that giving to those who ask is a godly characteristic.
Do you ask of God the same way you would want others to ask of you?