That tends to be one of the first thoughts that come to me about friends, that I should give them something. I love my friends. I generally think about what I could do for my friends, not what they could do for me. So if we are close enough that I think it wouldn't offend them, I tend to buy something for them. So much the better if it's something useful. Clothes is always a favorite, especially for the girls. Or electronics, which are also popular among males. (Men are more sceptical, so I can for instance sell them something barely used, for a cheap price. Or let them borrow it forever. That way their pride isn't hurt.)
So buying a new computer because my very best friend ever needs one, is not as crazy as it may look. It's just the kind of guy I am. It's just the magnitude that is a bit over the top.