There were many factors considered when terminating dealership contracts. Location, profit, sales figures, customer satisfaction just to name the top few. There was also an appeals process, that dealers who don't feel they deserve to be closed can dispute the closure decision. Some chose not to dispute, some did, but were denied....
Nobody can be sure if they're making a mistake by closing certain dealers.
But lets not turn this into a GM-bashing thread, because that's just ridiculous.