He said that? I need some help here, you got chapter and verse?
38"You have heard that it was said, 'Eye for eye, and tooth for tooth.' 39But I tell you, Do not resist an evil person. If someone strikes you on the right cheek, turn to him the other also. 40And if someone wants to sue you and take your tunic, let him have your cloak as well. 41If someone forces you to go one mile, go with him two miles.First, "person" should be read as "Roman soldier". Smiting on the cheek was not really painful, but it was painfully insulting. I believe it was also as far as the soldier was allowed to go by Roman law without further provocation from the subject. The person would fight back, and the soldier would beat them, or worse. So, by turning the cheek, you keep yourself out of trouble and even mock the bully soldier a little bit.
If the person gives up the cloak, along with the tunic, he is naked. According to Jewish law (again, it's my recollection) only the cloak could not be retrieved in suit. So if someone sues you down to your last garment, give him that and go naked. Make him the shamed party.
I do remember that Roman law said that a soldier or citizen could only conscript a man to carry his things one mile. Jesus said, no, insist on going two. This would get the soldier into some serious trouble. Whatever the Romans were, they were slavish devotees of their laws.
In any case, the passage has nothing to do with almsgiving.