Perhaps she sees the good that the order can still do. Even though there are flaws, she may believe that by staying, she can be part of the solution and help reform the order from within. There could be friends or comrades she doesn't want to abandon, and she feels a sense of duty towards them and the greater cause of the Jedi Order.
One possible reason could be her loyalty to her master. She has a deep bond with Anakin, for example, and this connection might make her want to stay within the order to continue to grow with him.
She might also be motivated by her own sense of purpose. The Jedi Order has provided her with training, a code to live by, and a place in the galaxy. Leaving would mean giving up all that she has worked for and the identity she has built within the order. So, she chooses to stay and face any challenges within the framework of the Jedi Order.
Well, for starters, it would keep her in the Jedi Order's fold, which means she would be there for different battles and events. For example, she could have been a key player in some of the later Clone Wars battles that she missed in the original story.
One possible reason could be a glitch in the clone troopers' programming. Maybe some external force, like a powerful Jedi mind - trick on a large scale, disrupted the order's activation.
One possible plotline could be Ahsoka's immediate reaction to Order 66. She might initially be in disbelief as she sees her comrades turn against the Jedi. She could then go into hiding, using her skills to avoid detection. Another plotline could involve her trying to find other surviving Jedi. She might travel to different planets, looking for any signs of Jedi who managed to escape the initial purge. A third plotline could be her internal struggle. Ahsoka has a strong connection to the Jedi Order, and Order 66 would shatter that. She might question her own beliefs and what it means to be a Jedi in a galaxy that has turned against them.
One possible reason in the fanfic could be her disillusionment with the Jedi Council. Maybe she saw too many of their political games and felt they were straying from the true Jedi path. For example, she might have witnessed them making decisions based on power rather than justice.
Another possibility is that a powerful shinobi, like Kakashi, gives the order. Kakashi has been Naruto's mentor and he might order Naruto to stay for his own good. Maybe he sees some danger that Naruto is not aware of and wants him to stay in the relative safety of Konoha.
One possible reason could be ideological differences. Maybe she discovers some practices within the Order that go against her moral compass. For example, if the Order starts to use unethical magic in their fight against the dark forces, Hermione, with her strong sense of right and wrong, might not be able to tolerate it and decide to leave.
In fanfic, Ahsoka's survival could be due to her prior experiences outside the Jedi Order. She has learned to be independent and resourceful. When Order 66 occurs, she has already established some non - Jedi relationships. These relationships come in handy as she is able to call upon these allies for help. Some of them might be smugglers or bounty hunters who are not directly affected by Order 66. They help her by providing transportation off - planet or by hiding her from the clones' search parties.
One reason could be for protection. The Order might think that Harry is in danger and they want to keep him close. So they summon him to a safe location where they can watch over him.
Ahsoka could face the challenge of time. If there is a ticking clock situation where the Jedi Order is about to be destroyed very soon, she has to act fast. And she may not have all the resources she needs. She might need to gather allies, information, and power, but there could be limitations. For example, some Jedi secrets might be lost, and she has to figure out things on her own without the full knowledge of the Jedi traditions, which can slow down her efforts to save the Order.
One possible reason could be that she has lost interest in the particular fandom or the act of writing fanfic. Maybe she has new creative pursuits outside of the fanfic world, such as working on her original stories.