Now, we don't EXACTLY know the mechanics, but here is my best guess on how shit works:
Share to all: This sends an invite to completely random 10-50 people that the game considers "logged in." There used to be a +-30 Ranks from you, but I don't think there is any limitations anymore. And again, "all" really doesn't mean "all" - exact number is unknown, but 10-50 is my guess.
Share to friends: This sends an invite to EVERYONE in your FRIEND LIST, assuming the game considers them "logged in." Your Friends who login to the game AFTER your invite do NOT get invited.
Share to Union: This sends an invite to EVERYONE in your Union, even if they're NOT logged in. So if you quickly click through login bonuses and see a "raid request!" up, it's almost guaranteed to be from a Union member.
Now, there is one more important factor: Each person can have ~10 raids show up. Once you have those raids, NO invite - not even from your Union! - will show for you. All raid invites for you will be ignored - even from Union! - until you see ~9 raids. This is a huge problem for union invites which can only be done once per person, per raid.
There is also a very rare bug where the server doesn't realize that the raids you see are long dead. So if you suddenly find yourself with just 2 slots or something, it's because you have 8 bugged slots server side. The best solution I know for this is to just not play for several hours to make the game log you out and thus drop your raid table.
As for the "logged in" part, the game probably considers anyone online who entered the daily login bonus screen online, or has spent AP/BP in the last... 30 minutes? Details are hazy, but something like that.
As the game is centered more and more around raids, this limitation of being able to see only 10 raids has become quite the issue. I don't know if they're increasing that one at all (DMM people, help please?), but they are doing is giving raids unique IDs. And you can just copypaste that ID to say, Discord, and people can copypaste it to the client to join that raid. I don't know when that change comes for us though... but it can't be soon enough.
Now fix the fucking "server error occured" spam too you fucks.