It matters, although I don't think there is a definitive logarithm which can predict our behavior from bank balances or societal norms. Sometimes the wealthy are generous and the poor stingy. But I think that what you think about yourself does matter when making decisions about strangers in a ditch.
So when Jesus spins the parable about the Good Samaritan*, we often feel hard pressed to explain the reaction of the priest and the Levite who chose to ignore the man in the ditch. We might suspect that (quoting Dr. Seuss) that their hearts "were too sizes too small"**- although their lack of care and compassion might be chalked up to the bewildering need they met at every turn of the road (or standing at every street corner with a cardboard sign). We are loathe to hold them too accountable for we have been them at one time or another, and for what we thought were good reasons.
Notice that Jesus doesn't condemn either because this isn't a story about judgment.
It is a story about mercy.
Not reason nor moral superiority, not use of wealth nor good 'up-bringing'.
It is a story about mercy.
Apparently mercy is the name of the road on which one discovers the 'kingdom of God'.
*the gospel of Luke, chapter 10
** How the Grinch Stole Christmas
