Hello, toetapping,
One reason people rubbish others is to make themselves feel better. It's a defense mechanism. If they point out your faults then maybe nobody will notice theirs.
By saying "I have no friends" she is getting attention and interest and sympathy from other people.
To go a little further, she doesn't feel worthy of having friends (Possibly childhood issues here) and has an image of herself as "friendless" so she creates situations where that is true. If you believe something about yourself, even if it's wrong, you will create it.
Hope this helps.