This is yet another step by Xi Jinping in dragging the country back to the 1970s. He has been bolstering the censorship regime at an alarming rate, and has already centralised more power than anyone since Mao. The State media has been lauding this fact, declaring that he is the strong leader China needs. A cult of personality is emerging, and it won't be long until everyone is carrying a new little red book citing the "Four Comprehensives".
This year's Spring Festival Gala was more political than at any time in recent history. The opening song lauded Xi's policies, then there were revolutionary songs throughout. This would have been unthinkable a few years ago.
One central strategy of his regime (used by previous ones, but taken to new levels recently) is to make laws that are virtually impossible to obey. Impractical Chinese laws are often put in place, merely to ensure that if they want to arrest someone, they have the power to do so. When everyone is a criminal, arresting them is simple and convictions are not in any doubt.
In this case, they now have a very simple way to ensure that any foreign journalist (whose material ends up on a Chinese website) can be immediately expelled, and that any cooperation with overseas news agencies can be immediately terminated. They don't expect the law to be followed, but they do expect to use it to expel or arrest anyone who they deem a threat to the regime.
It also makes sure those pesky foreign booksellers don't end up publishing online in China. If so, they now have another offence to charge them with after they kidnap them in Thailand and subject them to extraordinary rendition.