That’s a great question!
They are very different sentences but they have similar meanings, they can mean the same thing depending on context but I’ll try to explain where they may differ.
Sentence 1: usually feels like the speaker is in a caretaker role, a bit like mother and son. A mother might tell her son that the discipline he received as a child was done in “his best interest”. This would mean that what she did may not have been what the child wanted at the time but what she believed was best for him.
Sentence 2: feels more like what a man may say to his lover. A man may go to a special flower shop and buy special flowers for his wife and tell her he bought them “for her”. Usually this sentence indicates that the one saying it believes that what he is doing is what the other person wants at that point in time.