The advanced students looking to boost their grade could easily lower their score intentionally, so they get sorted into the beginner group.
They also don’t want to allow the advanced students to “test out” of the intro course, as some schools do, because the advanced students may be highly skilled at programming but totally lacking in introductory CS knowledge.
Source: Am a high school programmer