The US once accused China of using the telecommunication firm Huawei to gather information from the US. This led to the termination of major contracts with Huawei not only in the US but in other parts of Europe. Other sanctions against Huawei made them lose some market share that was later taken over by Apple. China wants to protect its local firms so the ban is to limit the dominance of iPhones in the Chinese market and give its indigenous phone makers more market share. This move is both economical and political and it will keep going on and on until both countries stop depending on each other for any product.
Canada even took the daughter of Huawei's CEO as hostage for 3 years because they saw the company is spying through the Huawei phones.
This time its China's turn to ban iPhones for China government employees because they also see iPhone has a forever mic turned on. Its a wonder why it's only now that they know this when its been tracking iPhone users for time.