Well, it could be that in the fanfiction, the writer might have developed Annabeth's character in a way where she becomes disillusioned with Percy. Maybe she sees Luke as having something that Percy lacks, like a different kind of power or charm. Or perhaps there are some misunderstandings between Percy and Annabeth that Luke takes advantage of, pushing Annabeth towards the betrayal.
In this fanfiction, Annabeth's betrayal might be due to a complex web of relationships. Suppose there is some sort of prophecy or greater plan that Luke convinces Annabeth she is a part of, and Percy is somehow an obstacle to it. Annabeth, being driven by her ambition and a desire to be part of something 'greater', may then choose to side with Luke over Percy. Also, her past experiences with Luke, which might be rewritten in the fanfiction to be more positive than in the original story, could influence her decision.