The Great Anti-Buddhist Persecution of Emperor Wuzong of Tang primarily targeted Buddhist monastics, of which the Emperor thought there were too many.
I think its safe to say that he would have thought a single Buddhist monastic was too many. His goal was the outright elimination of Buddhist monks and nuns. Partially this was because he was just philosophically against the role the monastics played in society (which was at odds with Confucian ethics) and also because it was a practical method of raising funds for military campaigns against invaders and civil war insurrection and that leads me to the next part:
Considering that becoming a monastic meant giving up marriage and property, why was it such a popular profession?
It definitely meant giving up marriage (but probably not always sex) but in Chinese society it had not meant giving up money/property. In fact, Wuzong's first phase of persecution was that monastics had a choice to: A) remain monastics but give their wealth to the government or B) return to lay life and keep their wealth. Individual monastics had personal wealth in the form of money, land and sometimes even personal slaves.
Besides personal wealth, monastics had access to considerable wealth indirectly via what was owned by the monastery itself. Monasteries had cash reserves and also owned considerable tracks of land and slaves. Temple bells and statues also held wealth in that they were made from expensive metals. The last form of the persecution was the closing down of many temples and monasteries and seizing this wealth.
Its also worth mentioning that one of the legitimate complaints of Buddhism throughout the tang were the number of "monastics" who ordained to shield their wealth from taxation and shield themselves from labor inscription. These false monks famously lived lives that did not follow the vinya precepts and were a legitimate social problem. For this reason Tang governments were often selective on which and how many members of society could ordain.
To answer your questions a bit more directly though, some choose to give up their wealth and remain monastics during the first phase of the persecution. Why would they do this? I think the answer was because they often had true religious conviction. The truly believed that Buddhist practice brought spiritual deliverance and this was worth giving up material possessions for.