Well, in some fanfictions, Harry might attack Dumbledore if he discovers that Dumbledore has been using him as a pawn in a bigger game all along. This feeling of betrayal could drive him to lash out. Also, if there is a prophecy that he misinterprets to mean Dumbledore is a threat to his future or the future of his friends, that could be a motive.
In a fanfiction, Dumbledore might steal out of desperation. Suppose there was a situation where a curse was about to be unleashed on Hogwarts, and the only way to stop it was by stealing a particular ingredient for an antidote from a place where it was not supposed to be taken. Dumbledore, seeing no other option, decides to steal it. His motive here is to save the school and its students, even if it means breaking the rules.
Perhaps Harry has been misled by someone he trusts. They could have filled his head with lies about Dumbledore, making Harry think that Dumbledore is actually a threat. And his motive would then be to protect the wizarding world from what he believes is a hidden danger in Dumbledore.
It could be that Dumbledore is afraid of what Harry might do if left to his own devices. Harry has a lot of power, and Dumbledore may worry that he could be swayed by the wrong people or ideas. So, in an attempt to keep Harry on the 'right path', he resorts to trying to control him. But this also shows a lack of faith in Harry's character and judgment.
Some writers might do it to create a sense of shock. They want to break the traditional view of the Dumbledore - Harry relationship and get readers' attention. It's a way to be different in the vast sea of fanfiction.
Maybe Dumbledore believes that Harry has some hidden power that is being corrupted by the environment at Hogwarts. So, he kidnaps Harry to a secluded place to train him and help him control this power without any distractions or negative influences from other students or even some of the teachers.
In a 'Harry framed Dumbledore' fanfic, a motive could be revenge. Suppose Dumbledore made a decision that Harry thought was wrong and cost someone Harry loved dearly. Harry could then be driven by revenge to frame him. Also, it could be a case of Harry being under the influence of a dark force. The dark force might convince Harry that Dumbledore is a threat and needs to be removed from power, leading Harry to frame him.
One possible motive could be that Dumbledore saw a future where Harry's parents' deaths were necessary for a greater good. Maybe he knew that Harry would be the only one to defeat Voldemort in the end, and their deaths were a catalyst to set Harry on that path.
In some fanfictions, Snape could have his own personal vendetta against Dumbledore. Maybe Dumbledore has wronged Snape in the past, and when he sees Harry as a potential victim of Dumbledore's schemes, he decides to help Harry. Another reason could be that Snape has a new understanding of the prophecy and believes that Dumbledore's way of handling it is wrong, so he steps in to help Harry.
Perhaps in this fanfiction, Dumbledore has a secret plan related to Harry's power. He might think that by kidnapping Harry, he can train him in isolation to fully develop his magical abilities without the distractions and potential dangers at Hogwarts. It could also be that Dumbledore is trying to hide Harry from Voldemort in a way that no one would suspect, as Voldemort would never think Dumbledore would use such extreme measures against Harry.
Perhaps there are safety concerns for the students that Dumbledore is not addressing adequately. Harry, having a strong sense of responsibility for his fellow students, may feel that the only way to ensure their safety is to remove Dumbledore from his position. He might believe that Dumbledore's actions or inactions are putting the students at risk, and thus he takes matters into his own hands.