You're projecting a lot of weird insecurities onto a throwaway joke about Einstein being an alien because his achievements were Out Of This World. Clearly no one thinks Einstein was an actual alien. It's remarkable that I'm actually having to type this out.
Relax stranger, there's no weird Freudian argument to be found here.
The moth went in because "the light was on", which is vernacular for "open for business", but it has a double meaning because moths are attracted to light at night. The punchline itself is admittedly weak -- the humor comes from the fact that you listened to a lengthy story that turned out to be a really bad joke.