She was the prefect one to take care of a castle and handle all the prisoners, since she was in Azkabam herself, she had some detailed experience.
That would make her the queen of the castle for the time being.