Legion is not from this world, and not from this dimension...
...and something tells me that Legion's Core has been transported from the Gradius Universe. The core seems to come from Outer Space
Observe, Legion's Original Habitat (Skip to 0:22):
Gradius Arcade - No Miss Full Run on Very Difficult (2/2)There are some pieces of evidence to this, but we will start with the basics:
1. Legion is a fleshy core with a number of tentacles. These tentacles are able to shoot a number of different projectile and beam weaponry. In the Gradius Universe, the tentacles reach out from this enemy. The Internet says they're called "Brain Cores" but I'm not sure on this.
2. Legion has the unusual ability to levitate, in every iteration (including Circle of the Moon's regular 'legion' enemy), just like the ones from Gradius (though it can be argued that these are in outer space and not really levitating but more like 'free falling').
3. Soma Cruz's "Legion" Soul actually shoots a Cyclone Laser (That is, an array of lasers shooting in a cirular formation straight forward), a staple of the Gradius games.
4. Legion seems to control the bodies/souls with a type of telepathy. Gradius's Bacterian Army is notorious for this, as there's usually a brain or brain-like controlling mechanism.