The air pollution is so bad that just breathing the air for a day is as bad a smoking 21 cigarettes. People are urged to wear surgical masks.
As for why it’s so bad, China uses coal for 70% of their energy. They have had (what we would consider) lax regulations on car and factory pollution. In the past 20 years, the middle class has boomed, and this resulted in many more cars.