to store up: to set something aside now so that it builds into a supply for a later day
This is the working verb behind the word for treasure (θησαυρός). Before it means anything religious it means what a farmer or a shopkeeper does: put part of this week's money aside so that by next year there is a store to draw on. Paul uses it in exactly that plain way when he tells the Corinthians to set something aside each week, and when he says that parents provide for their children rather than the other way round.
Jesus takes that ordinary act and asks where the pile is aimed. Storing up for yourself on earth and storing up with God are the same verb pointed in opposite directions, and the point is not that saving is wrong but that one store rots and the other does not. In Jesus' day this was close to a fixed expression: giving generously to the poor was thought to open an account with God that moths and thieves could not reach and that would be paid out at the end, so building up treasure in heaven named a real and lasting deposit rather than a vague comfort.
The last group of uses turns the picture inside out. A person can be building up something he never meant to save. Paul tells the hard-hearted that their days of refusing to change are quietly adding to a store of anger they will collect on the day of judgment, and Peter says the present world is itself being held in store for fire. The verb is neutral about what goes into the pile: the whole question is what is in it, and who is going to open it.
Nuances
How transactional "store up treasures in heaven" is: whether the verb names a genuine heavenly account that generous giving funds and that is paid out at the end, or a call to single-hearted priorities with no accounting behind it.
- majorityThe saying uses the Jewish treasury idiom straightforwardly: almsgiving and faithful obedience really do fund a store held with God and drawn on at the last day.; Gary A. Anderson, Charity: The Place of the Poor in the Biblical Tradition (Yale University Press, 2013); Nathan Eubank, Wages of Cross-Bearing and Debt of Sin: The Economy of Heaven in Matthew's Gospel (BZNW 196; De Gruyter, 2013); W. D. Davies and Dale C. Allison, The Gospel According to Saint Matthew, ICC, vol. 1, 629-33
- minorityThe saying reorders priorities instead of opening an account: the treasure is the coming kingdom itself, not a tally of rewards for particular deeds.; Ulrich Luz, Matthew 1-7, Hermeneia, rev. ed. (Fortress, 2007), 333-37; R. T. France, The Gospel of Matthew, NICNT (Eerdmans, 2007), 258-59
- minorityThe surrounding teaching dismantles the calculating logic from within, since giving is to be done in secret and the vineyard workers are paid without regard to what each one earned.; Joachim Jeremias, The Parables of Jesus, 3rd rev. ed. (SCM, 1972)