Oops!...I Did It Again - S2-E22
Continuity mistake: This episode establishes that Lily was born at the Live Aid event, which took place in July 1985. In the show's final episode, "Hello, Goodbye", Brad and Lily are graduating in 2005 (see the "congratulations" banner in a hallway at their school). Being born in 1985 would mean that she is graduating at age 20. It is highly unlikely that she failed and repeated two of her school years. Brad, who is the same age, is graduating with her, and he is a dedicated student.
Answer: It happens. One of my middle school/junior high classmates was suspended for fighting another classmate during the weekend, at a location nowhere near the school. Also, after Jimmy and Lily created the fake image of Sister Helen, it's easier for Sister Helen to get away with assigning an unfair detention.