Obama did this on purpose. Just like he failed to get a SOFA with Iraq to have a residual force there, Obama is pissing off Karzai so he can use it as a pretext to pull out all US forces. Walking away will seal the fate of many of the Afgans who helped us.
Very much like Vietnam. We just walked away and turned over our allies to the tender mercies of the enemy.