In some ways letting the councils sell was a good idea, (although not the motivation for Right to Buy) as it took older housing stock which was likely to be energy inefficient and needing expensive repairs off public books.
What was utterly criminal was not allowing the councils to then invest in more modern housing for their tenants.