I'm still unsure about who Gaster is and what his role was before the game timeline. All I know is that it's a glitch/left over stuff in the modded version of the game.