The Chinese government is happy to see manufacturers mass exporting crypto miners out of the country. I also sometimes wonder what level of interest the Chinese government takes in companies like Bitmain. By now, they are probably cognizant of Bitcoin's future importance and are smart enough not to destroy China's competitive advantage there.
The ban is about preventing access to centralized exchange services, to deter regular folks from speculating. They might take a different view of miners (who are generally capitalized businesses) and retail speculators (regular people who are pouring their savings into high-risk assets). Either way, they know banning exchanges won't stop speculation entirely, including from miners. They are just trying to stomp out the hype to keep it to a minimum.