Are teachers allowed to do attendance before the bell?

(It doesn't make sense because some students aren't in the class and they'll be tardy...)