The Chinese government has been defending a campaign that has seen tens of thousands of migrant workers suddenly evicted from their homes in Beijing.