It's a bar over the Т to distinguish it from M.

And the underline of Ш distinguishes it from И and other letters.

E.g. When the ending ший is handwritten without the underline is can be hard to...