Because the rest of the world might be telling you that you're fucked, or it's fucking you over in a bad way. At least someone cares enough to make sure you know you're loved. It might be mostly self love, as the one caring tells you to fuck yourself. But at least they cared enough to tell you to love yourself, someone gives a shit about you. The whole world isn't against you, someone else is in the same boat with you. Them telling you to fuck yourself proves that, they know how you feel "oh man it's all so terribly wrong, I've no friends, no one cares".
Surprise! Somebody thinks you're worth a fuck even if you have to fuck yourself. The most derogatory would be to tell you to unfuck yourself, because they're saying you're not worth even a self fuck. So, hearing Go Fuck Yourself is a positive thing indeed. Someone cares to remind you that at least you have got yourself, and possibly someone else that reminded you of that. A lot of us been in the same damn spot, feeling it was all there to put a boot in our face. Yeah? Well, Go Fuck Yourself! We love you too, hate us all you want, we don't care. If you do hate us though know we understand that as at least you're giving a shit. Our value is then self evident.
As well the idea is it's a bit of tough love. The call to go fuck yourself is meant to express you don't need to wallow in self pity. Get back up! You don't fail unless your surrender. Keep moving on to move on. We've all had this or similar fight as you're having. Do you see us wallowing? Sure we vent, then, we go on. Someone tells us to fuck ourselves otherwise, because they know where you are in life ... they got the T-shirt reading "Been there, done that." So, if someone else can make it through it, guess you got no room to complain, bend into it and bear on.
All in all, it is an expression of love ultimately. Everyone could easily totally ignore anything that anyone posted about something negative in life. We could all stay on topic strictly. Well, we're all human beings and being such means we're social, we desire helping naturally. We know love is the most powerful force in the 'verses. And so this summarizes GFY.
It seems like it means there someone around that likes you enough as a person, that you can tell them to get fucked, and you’ll still be friends.