Because it's awesome.
*I hadn't quite looked into things enough; turns out that Sans, the guy this is sort of the theme for**, [Undertale SPOILERS, obviously-sorry for marking them poorly in the other post] isn't even necessarily the most fourth-wall-breaking character in the game. Characters attack buttons, there's at least one other character who supposedly had access to the save system before the player did, and quite a few other things of that sort.
**It's been suggested that Megalovania isn't Sans' boss fight theme, but the protagonist's, because the song's been used by the game's creator elsewhere, and it's apparently associated with people fighting to save their worlds.
And the protagonist, when fighting Sans, has long since jumped off a slippery slope, and Sans is basically the only thing standing between the player and the end of the world. (There's another boss-type character you fight later, but he goes down in one hit because the Genocide Run makes your character unstoppable to basically everyone but Sans. Because he is an