Why is material sacrifice compared in this text to prayer? To highlight how both are statements of faith in God or lack thereof. How generously we give and how ardently we pray both unmask our true understanding of God. Is He trustworthy? If so, then it will show in displays of material generosity and a robust prayer life. If we don't believe He's trustworthy, then both our giving and prayer lives will be stunted and shallow. Both are clear statements about what we believe about God. One writer puts it this way, "The wicked offer lame sacrifices because they don't really believe that God will meet their needs." If we think God is stingy, then we will be stingy too. Only when we've understood and been impacted by the immeasurable riches of Christ's grace (Ephesians 1:3-10), will our hearts long to live lavishly toward others - including Christ's church.
We can give all kinds of excuses for our meager giving, but according to Solomon, it likely comes down to hearts which haven't really understood Who God is, felt the deep joy of His grace and learned to trust Him for tomorrow.