A Scantron is a test-taking tool used by educators to distribute multiple-choice tests to students (you've probably taken one before). Machines automatically grade the tests filled out by students, so the whole process is quick and straightforward on the teacher's part. However, it's common knowledge that students are to use only a No. 2 pencil on these exams (including mechanical pencils!).
Throughout my schooling, my teachers have always told me to avoid using mechanical pencils for Scantrons. "The machines won't detect marks made by mechanical pencils" would always be the reasoning. However, this isn't the case, and standard HB lead is equivalent to a No. 2 pencil, meaning that they'd both have approximately the same ratio of graphite and clay (they're the same thing). If you'd like to read more about the different types of lead, I wrote an article here explaining everything you'd need to know.
With current technology, Scantrons and multiple-choice tests work well with mechanical pencils that use HB lead because it's equivalent to the standard No. 2 pencil.
Unfortunately, many teachers (as well as large test distribution corporations!) prohibit using mechanical pencils. Ultimately, we can't change their policies, but I can explain the reasoning behind this decision.
Why doesn't College Board allow mechanical pencils on their exams?
Currently, College Board does not allow mechanical pencils on any exams. The ban on mechanical pencils could result from the difficulty of regulating mechanical pencil use (people can cheat by hiding something inside their mechanical pencil) or because people may unknowingly use lead other than HB, the equivalent to No. 2.
Some blends of HB differ slightly from others, and in some cases, the machines may not pick up. Regardless, we'll probably never know since College Board has yet to comment on why they've banned mechanical pencils.
Even so, I've used mechanical pencils on scantrons numerous times (thanks, generous teachers!) and have yet to encounter an issue. Since HB lead makes up the vast majority of the mechanical pencil lead market, the case of using incompatible lead isn't realistic.
Of course, the standard of prohibiting mechanical pencils still has some reasoning to this day, even though they would have no problems reading it. For classroom testing, mechanical pencils should work fine. However, things would be different when the test is on a massive scale, like the SAT, AP tests, or the ACT. There would be issues due to the number of people. For example, the probability of someone using non-standard lead in a mechanical pencil, or ripping their page with a mechanical pencil, would dramatically increase.
Current testing technology
However, this common misconception may have been a legitimate concern during the inception of the testing technology. However, Scantrons and other multiple-choice testing equipment have become much more sophisticated over the years. It's true that in the past, there may have been some issues with machines reading sheets not filled out with a traditional No. 2 pencil, but those days are long gone.
Scantron has been around for a while and was founded in 1972. As a result, many of today's educators have been through the whole process of Scantron, when issues from older testing technology were real. My theory is that, because teachers in the 21st century were taught to solely use No. 2 pencils on these exams, they continue this policy today (of course, this is just a theory so it may not be true).
Modern test-taking technology is so precise that teachers can scan tests through webcams simply by holding the testing sheet to the camera. You can use any tool to fill these tests out since it's a picture being read by a computer (I haven't tried this, so I can't guarantee it, but it seems viable).
In the future, College Board's standardized tests may accept using mechanical pencils on their tests. Although not very likely, the vast improvements in testing technology enable more opportunities, and the inclusion of mechanical pencils may be one of them.