It is first the prison code of the character Jean Valjean in the novel (his only code in the musical) Les Misérables. It was chosen by Victor Hugo when he believed that he was conceived on 24 June 1801. In homage, or perhaps as a recurring in-joke in the performing arts, the number has frequently been used in other works of fiction. The number often identifies one who is persecuted.
In his show, what., Bo Burnham has a lyric in his "Left Brain, Right Brain" song calling himself as "Patient 24602".
The Black Canyon School (a juvenile detention facility for girls) in Phoenix, Arizona is located at 24601 North 29th Avenue. There is nothing else abutting that remote mile of frontage road, so the state could have chosen any address number within range for it; that they would choose to locate a "prison" at 24601 demonstrates some literary humor on the part of somebody with the Arizona Department of Corrections.