Harry might survive in Azkaban because of his connection to his friends, even if they betrayed him. Their memories could give him the strength to hold on. And he may be able to use his magic in unique ways. He could draw on the positive emotions he has left, like his love for his parents, to create a shield against the Dementors. Plus, he may be constantly looking for a way to prove his innocence and that hope could keep him alive.
Well, it could be many reasons. Maybe there was a misunderstanding. Some dark magic might have been used to make his friends think he did something bad. Or perhaps a powerful enemy framed him by planting false evidence. It's hard to say exactly without more context from the fanfiction.
One possible plot could be that Harry is framed for a serious crime he didn't commit. Maybe someone has used Polyjuice Potion to look like him while doing dark magic. The wizarding community, believing the false evidence, sends him to Azkaban. In Azkaban, he has to endure the Dementors and try to prove his innocence from within the prison walls.
To survive in Azkaban, Harry would need to keep his mind active. He could recall all his happy memories to counter the Dementors. His knowledge of magic could also be useful. For example, he could try to create some protective spells around his cell. And he might get some unexpected help from the guards or other mysterious forces within the prison.
He might use the invisibility cloak. Harry could sneak into Azkaban unnoticed and then use magic to break Draco out of his cell. The cloak has served him well in the past, and it would be a simple yet effective way to get past the guards.
It could be a jealous classmate from Hogwarts. Someone who has always been in Harry's shadow and finally sees an opportunity to get rid of him. This person might be a Slytherin who has connections with some dark wizards outside of school and they work together to frame Harry.
Well, in some fanfictions, Harry might use some hidden magic he discovers in Azkaban. Maybe he finds a way to turn the Dementors' power against Voldemort. Since Dementors can suck out a person's soul, Harry could somehow direct them towards Voldemort, weakening him enough to deliver the final blow.
Maybe he uses some powerful magic spells that he has learned secretly. For example, the Patronus charm could be used to fend off the Dementors which are the main guards in Azkaban. He might also get some unexpected help from his friends or some mysterious characters within the fanfiction world.
Some fanfictions might have a plot where Harry goes to Azkaban to rescue someone. It could be a friend or a relative who has been wrongly accused. Along the way, he has to navigate the dangerous corridors of Azkaban filled with various traps and curses. He might also meet some old enemies who are also in Azkaban and they try to stop him from achieving his goal. In addition, the magic that keeps Azkaban intact could be a key part of the story, like Harry has to figure out how to manipulate it to his advantage.
In this fanfiction, perhaps Harry goes to Azkaban to rescue someone. It could be a fellow wizard who has been unjustly imprisoned. He might have to use his skills and some new-found magic to navigate the dangerous and dreary corridors of Azkaban, all while avoiding the Dementors.
One possible plot could be that Harry is wrongly accused of a serious crime within the wizarding world and is sent to Azkaban. There, he discovers a dark secret about the prison itself, like there being a hidden force controlling the Dementors. He has to use his skills and the loyalty of his friends to expose this secret and clear his name.