In saying that we would always have the poor with us, Jesus wasn't suggesting that we should neglect to work for an end to poverty.
He recognized that lavish acts of generosity, grace, and beauty, such as the woman offered to him, must be part of our response to Christ, alongside our work for justice.