Asgore was the first monster who got in the void and WD Gaster helped him escape. On the other hand, Along the path, Chara and Frisk were killing other monsters. Sans couldve saved them if only nothing else happened after it. Therefore Sans was very frustrated and showed no mercy for the operation of WD Gaster to be done. And overall, Gaster rests the alternate universe to the AU we know as Undertale.