This is a quote from the book "The ​Virtue Of Selfishness" by Ayn Rand
... or betrays his values (since help to a stranger or an enemy is regarded as more virtuous, less “selfish,” than help to those one loves). The rational principle of conduct is the exact oppos ite: always act in accordance with the hierarchy of your values, and never sacrifice a greater value to a lesser one.

This applies to all choices, including one’s actions toward
other men. It requires that one possess a defined hierarchy of rational values (values chosen and validated by a rational standard). Without such a hierarchy, neither rational conduct nor consid...
read full book block explorer