@permisan
At least two reasons: 1) A-Ting is not only a non-cultivator, she is unaffiliated; the Bai Li clan would have rights to kill her but ice bro took credit for the kill, which granted protections as a formal clan dispute. 2) A-Ting used cultivator powers against regular people, crushing the invading army, which is against cultivator-society laws. She's being detained so that Bai Li Ji's death stays covered up, as punishment for breaking cultivator rules, and as a handy way for Kunlun to recruit someone with potential.