Since it was done without faith, with no love for God and zero interest in His glory, then how could it be pleasing to God? Any "good works" that omit God from the equation can only be as "filthy rags".
Because love is love. What the Samaritan did wasn't filthy rags. It was love for his neighbor.