Legion set a new milestone for what comic book TV shows can be, by taking elements of the X-Men universe (namely psychic powers and classic foes like Shadow King) and spinning them into a visually stunning, mind-bending (and often trippy) mystery/thriller ride. And that ride got even wilder (jumped the shark maybe?) with a major WTF post-credits scene moment in the season 1 finale.
If you haven't followed Legion (highly recommend you catch up now), or you simply didn't sit through the credits, you can now check out the buzzed-about scene for yourself, above, and then start slideshow to discuss theories on just WTF is going on with that flying orb.
The other side of coin from SHIELD in the Marvel Universe is SWORD (Sentient World Observation and Response Department). The purpose of the agency is to protect earth from extraterrestrial threats and infiltration.
This theory on why SWORD could appear in Legion has to do with a discovery by Reddit User Usagizero: In the comic book X-Men: Legacy #7 (2012) David is apparently hounded by similar looking orbs, sent by SWORD agent Abigail Brand. Since SWORD first appeared as part of the X-Men universe (in Joss Whedon's Astonishing X-Men), it would stand to reason that Legion could borrow it for its own purposes.
SWORD could easily become just another government agency concerned with controlling mutant powers - but it would be even wilder if Noah Hawley went "full X-Men" and introduced aliens to the show...
Another (wilder) fan theory is that David was actually abducted by aliens, and since the X-Men comics have plenty of alien races to choose from, it's possible.
The Shi'ar are a humanoid/bird species with the sort of advanced tech seen in the post-credits teaser. Fans think the Shi'ar could be used to help stretch the mystery of David's search for his father, Charles Xavier; in the comics, David became a bigger character at a time when Xavier had used Shi'ar tech to heal his legs. Legion could conceivably take David's daddy issues to a whole other universe.
The other wild possibility is something fans actually speculated about in season 1: Mojo. The X-Men villain is an alien (of "the spineless ones") who runs a sort of intergalactic TV network, with a focus on sadistic gladiator-style games.
Fans thought The Shadow King looked a lot like Mojo, and the orb looks like the sort of tech Mojo would use to obtain "contestants" against their will. Admittedly, Hawley could have loads of fun playing with the theme of entertainment "reality" vs real reality in season 2.
The shadowy government organization that was after David all season long threatened to send in "a Peacemaker" to stop David and the Summerland mutants during the season 1 finale - yet we never got confirmation on what it was, exactly.
If a Peacemaker is a floating drone orb capable of zapping people into it, Superman Phantom Zone-style, then the question is where Division 3 got such tech. Could it be extraterrestrial, or just the product of one brilliant mind?
Because X-Men lore certainly has that..
Legion could take a much more direct path to answering the question of who David's father is, by taking fans right to the source: Xavier's X-Men.
Fans know that of all the characters in X-Men lore, this is one who could pull off the sort of technical feat we saw in the Legion end credits scene: Forge.
Known as "The Maker," Forge's mutant power allows him to intuitively invent all sorts of advanced tech, and understand how machinery works. He's also been a long time confidant of Charles Xavier, serving in the "Xavier's Underground" movement at one point. He has also been a government liaison for the X-Factor team, which puts him on both sides of the fence.
If Legion wants to start building some more direct X-Men connections after David has manifested his powers, then an introduction to Forge would be a way to do it.