One of my students (who is here because he is in foster care) was doing great. He was studying. He was doing his work. His attitude was better than I had ever seen it. Even his conversations with his friends didn't include any hint of illegal activity (believe me, even with my "good" kids, this is uncommon).
He was pulled out of my class the other day for a UA (part of his probation). He failed.
I heard about it at lunch when the secretary asked me for his books. He wasn't coming back. He is going to juvenile detention. A chorus of teachers chimed in "oh, it's about time" and "that kid was nothing but trouble." I actually had to ask who they were talking about. I knew he had troubles and I knew he had challenges that I will never have to face. But when he walked into my classroom, he could be whomever he chose to be. He had been making a conscious effort to succeed. He was looking for someone to throw him a lifeline and pull him out. I can't speak for his other teachers. I don't know what prejudices were held, consciously or unconsciously, that acted against him.
Sometimes there just isn't enough rope.
Good luck, T.