To show sympathy in a comedic kind of way to lighten the mood
Person 1: My computer died just as I finished my story, it never got to savePerson 2: Oof, that's hard buddy.Person 1: *laughs*