Don't forget that demise was sealed in the master sword so Link kinda bought him to the present (unable to do anything but make the curse on the Hero and the Goddess)
Taken from the Zelda wiki: After Demise's body dissolves, his residual consciousness is absorbed into the Master Sword before...