China recently completed construction of a monument outside Beijing dedicated to the hundreds of espionage agents executed in Taiwan during the 1950s after they were caught spying. China admitted that at least 1,100 of the 1,500 spies sent to Taiwan (usually as refugees) in the early 1950s were caught and executed. China did not mention those who changed sides, which may be why only 846 names were on the monument. The monument includes statues of four prominent casualties from this operation. One was a Nationalist general who secretly switched sides and was later caught, along with two subordinates and a woman who took care of getting secrets back to China. It is known that these four were caught because a prominent communist agent in Taiwan was persuaded to reveal information that led to identifying hundreds of Chinese spies.
China and Taiwan have been spying on each other for over 60 years and it was most intense in the 1950s. In the 1960s the situation got rather chaotic in China (a major famine, the “Cultural Revolution” and so on). Espionage activity never stopped but it revived again as the Chinese economy shifted to a market model in the last three decades, and Taiwan was allowed to invest in China. The Taiwanese thought this would be an intelligence gold mine, but it's hard to say for whom.
In 2006 a confident China released a lot of information about how Taiwan recruits spies inside China, as a warning to potential spies. Taiwan uses the Internet, trolling chat rooms and bulletin boards, as well as emailing likely candidates, and even using online ads. Actually, the Taiwanese are simply doing openly what the Chinese have been doing clandestinely for decades. The Taiwanese were often not asking for anything that one would think of as state secrets. Mainly, they asked for unclassified magazines and documents that, because of their specialized nature, are only going to be found in China. But Taiwan always was on the alert to recruit senior, or simply well-placed officials and pay them a lot for services rendered.
This was not always easy because China is still basically a communist police state and bureaucrats can declare as espionage anything they want. As a result, if you are in China you can have the secret police on your case for anything. Chinese bureaucrats do just that and the accused often ends up in prison, or worse. So, while China feels free to collect unclassified material in foreign countries don't try and do it in China.
China has long publicized cases where Taiwanese spies are caught, and usually given long prison terms. This is not as effective a deterrent as it used to be because details of how much money the captured spies had received for their work gets out via the Internet. This makes more Chinese aware of a new way to make money easily, if a bit dangerously. Meanwhile, every few months spies are regularly arrested on both sides of the Taiwan Straits indicating that Chinese and Taiwanese spies are hard at work despite the dangers (long prison terms and, in China, execution for the worst offenders.) All this espionage is mainly a business with cash, or favors exchanged for valuable data. Some spies do it out of altruism (patriotism, anti-communism, whatever) but for most it's just business, a very dangerous business.
The large sums of cash offered for Chinese willing to spy has also attracted a lot of Chinese in the intelligence business. For example, early in 2012 China arrested a senior official of their MSS (Ministry of State Security, similar to the CIA and FBI combined). It's rare for the Chinese to admit that an officer of the MSS was working for the Americans. The last time was in 1985, when a MSS official managed to defect to the United States, making it impossible for the Chinese to cover up. Taiwan has long gone after MSS employees and they taught the Americans much of what they know (and expect the Americans to share choice secrets).
The MSS has very tight control over its key people, having learned many of their strict and harsh methods from the Cold War era Russian KGB. After the Cold War ended it became known how thorough the KGB was in trying to prevent their agents from being recruited by foreign espionage agencies. The KGB methods of monitoring their employees, especially when abroad, may seem obsessive and paranoid, but they did not stop a lot of Russian KGB agents from switching sides. The oppressive scrutiny did make life uncomfortable for many KGB employees.
The MSS is more vulnerable than the KGB because many of their best people were educated in the West, or worked there for a while. The MSS man arrested in Hong Kong in 2012 had access to most of the secret operations the MSS was involved with. This was very useful to the United States (and Taiwan), because the main job of the MSS is to keep the CCP (Chinese Communist Party) in control of China.
China has a huge global espionage operation and most of its operatives spy on neighboring countries. Taiwan is a favorite target and Taiwan spies right back. But recruiting senior officials of the MSS is considered a major achievement in the murky world of counter-espionage (spying on spies). Then again having your inside guy revealed and arrested is a major loss. But this latest incident apparently triggered a review of security within the MSS and a closer look at key people.