You may think of it like this: The judge enters (writes) a plea of "Not Guilty" into the court records. The plea enters (is written in) the records kept by the court of law. You may find it unusual that "enter" means "write" or "cause to go into a record", but it is another meaning of "enter".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.