Jingxin Garden is neither too big nor too small, unable to go out, and with no trustworthy person to talk to. It's not like now where she can watch TV or surf the internet, so An Jing is quite bored. Practicing swordsmanship passes the time better than idleness.
She definitely doesn't want her skills to deteriorate because she's stuck here.
However, there's another reason she practices swordsmanship.
She plans to try to break out in a few days, to see if she can escape Jingxin Garden. In the meantime, she will practice her sword thoroughly.
There's a saying, "Sharpen a spear just before the battle, it'll be bright even if not sharp."
Even if she can't break out of Jingxin Garden, it doesn't matter. She's already in this Dongqing Imperial Palace. Even if she escapes Jingxin Garden, there's no way she can break out of this heavily guarded palace just by her own power.
She's idle anyway, so she might as well use the guards as sparring partners.
