The president is setting himself up for a legacy completely different from the one he imagines.