Giving to the poor is all through the Bible. God has a very special place in his heart for the poor. In Acts 2, the Christians sold possessions and gave liberally so that there were no needs. If someone was sick, Jesus and his disciples healed them so they could go back to work and provide.
Jesus told the rich man that, if he wanted to be perfect, he would go sell everything then come back and follow Christ. Poverty was just as real as it is today. There are many people who die of starvation each day. Our homeless population even in the US is out of control.
The idea of storing up treasures in heaven was not a new concept. Nor was Jesus the only one to say it. Paul told Timothy to tell the rich not to put their “hopes on the uncertainty of riches, but on God, who richly provides us with everything to enjoy” (1 Tim. 6:17). “They are to do good, to be rich in good works, to be generous and ready to share, thus storing up treasure for themselves as a foundation for the future, so that they may take hold of that which is truly life” (1 Tim. 6:18-19).
The future is important. Jesus doesn’t propose throwing money out. Rather, we should take care of each others’ needs because we’ve been so richly blessed.