Chapter 53—Duty to the Poor The managers of the sanitarium should not be governed by the principles which control other institutions of this kind, in which the leaders acting from policy, too often pay deference to the wealthy, while the poor are neglected. The latter are frequently in great need of sympathy and counsel, which they do not always receive, although for moral worth they may stand far higher in the estimation of God than the more wealthy. The apostle James has given definite counsel with regard to the manner in which we should treat the rich and the poor: 4T 550.1 “For if there come unto your assembly a man with a gold ring, in goodly apparel, and there come in also a poor man in vile raiment; and ye have respect to him that weareth the gay clothing, and say unto him, Sit thou here in a good place; and say to the poor, Stand thou there, or sit here under my footstool: are ye not then partial in yourselves, and are become judges of evil thoughts? Hearken, my beloved brethre…
"My brethren, have not the faith of our Lord Jesus Christ, the Lord of glory, with respect of persons. For if there come unto your assembly a man with a gold ring, in goodly apparel, and there come in also a poor man in vile raiment; And ye have respect to him that weareth the gay clothing, and say unto him, Sit thou here in a good place; and say to the poor, Stand thou there, or sit here under my footstool: Are ye not then partial in yourselves, and are become judges of evil thoughts?"
The EGW passage directly quotes James 2:1-4 to illustrate the importance of treating the rich and poor equally.
"The cause of God should not be overlooked that the poor may receive our first attention. Christ once gave His disciples a very important lesson on this point. When Mary poured the ointment on the head of Jesus, covetous Judas made a plea in behalf of the poor, murmuring at what he considered a waste of money. But Jesus vindicated the act, saying: “Why trouble ye her? she hath wrought a good work on Me.” “Wheresoever this gospel shall be preached throughout the whole world, this also that she hath done shall be spoken of for a memorial of her.” By this we are taught that Christ is to be honored in the consecration of the best of our substance. Should our whole attention be directed to relieving the wants of the poor, God's cause would be neglected. Neither will suffer if His stewards do their duty, but the cause of Christ should come first. 4T 550.4"
"When Jesus understood it, he said unto them, Why trouble ye the woman? for she hath wrought a good work upon me. For ye have the poor always with you; but me ye have not always. For in that she hath poured this ointment on my body, she did it for my burial. Verily I say unto you, Wheresoever this gospel shall be preached in the whole world, there shall also this, that this woman hath done, be told for a memorial of her."
The EGW passage directly references and quotes Matthew 26:10-13 (the story of Mary anointing Jesus) to make a point about prioritizing God's cause without neglecting the poor.