I am not denying that there is a hierarchy of giving, it’s actually right in the Majjhima with a Buddha at the top, and animals at the very bottom.
My point is related to the direct intention of the person giving. If you were to truly give without any expectations, it really wouldn’t matter in the end whether it’s an arahant or a homeless dude on the street. Yes you will get a ton more merit giving to the arahant, but if that is part of your conscious decision making then you are trying to “get” something, hence it being harmful to your mind, and developing the wrong intention of greed, not the right intention of renunciation.
I think Anathapindika is the perfect example for this, his name literally means giver of alms to the poor, and the story goes he was given this name by the people of the city, before he became the greatest benefactor of the Sangha, and even after he became so he still gave to the people of the city to the point of becoming bankrupt himself, so the story goes.
There is a later simile that I don’t believe is in the EBTs, we chant it here at Bhavana sometimes, but it talks about a person who gives to some and not to others is like a local rain cloud, but one who gives to all is like a giant rain cloud that rains down on all beings.
In the end again it’s all about Intention of the giver :
AN 7.49 AN 6.37 Dana Sutta: Giving
what is the reason, why a person gives a gift of a certain sort and it does not bear great fruit or great benefit, whereas another person gives a gift of the same sort and it bears great fruit and great benefit?"
"Sariputta, there is the case where a person gives a gift seeking his own profit, with a mind attached [to the reward], seeking to store up for himself [with the thought], ‘I’ll enjoy this after death.’ He gives his gift
"Then there is the case of a person who gives a gift not seeking his own profit, not with a mind attached [to the reward], not seeking to store up for himself, nor [with the thought], ‘I’ll enjoy this after death.’ Instead, he gives a gift with the thought, ‘Giving is good.’ He gives his gift