He actually did better than impression suggests, but his surelly behavior throughout the debate - almost angry that somebody there was challenging his proclamations, hurt him badly. It was looking like a blow-out, but a large number of moderates lost respect for the president in this debate.
His handlers got him under control for the next two debates during which he managed to appear competent. But the damage was done. That's one disadvantage to insulating yourself from dissenting opinions for four years.