Scanned paper ballots are changed all the time -- the manufacturer doesn't know that row 2 option 1 is a particular candidate. Authorities aren't stupid and know to change the ballots and test the machines.
Teachers and students understand how this all works, so it has a lot of trust.