The answer to this question can be found in Chapter 10, which is where Abdul's mother collects him from the detention centre. Abdul had been allowed to leave the detention centre because the judge thought that he would not abscond before his trial and would stay in the locality. Note what the text says:
A judge had decided he wasn't the type to run away before his trial in juvenile court, releasing him with strict instructions: Until the trial, report to Dongri every Monday, Wednesday, and Friday to prove you haven't absconded.
Abdul is therefore allowed to leave Dongri Detention Centre before his trial because a judge believes in his character and considers that he will not try to run away to avoid his trial. As the quote makes clear, he is only allowed to leave the detention centre under strict instructions to report regularly to show that he has not tried to leave the locality. Abdul, it is clear, has little faith in the wheels of justice and holds little hope for a good conclusion for either himself or his father, in spite of his mother's pleas to just pray and trust in the gods.