There could always be small isolated pockets of Imperial remnants. A system or two who had it great under the Empire could refuse to join the New Republic. And somewhere there must be the SW equivalent of Switzerland.
What would they do with all those stormtroopers and Imp officers that were captured or surrendered? Put them on one giant prison planet? Force them to clean up all the Death Star debris that rained all over Endor?