The teacher is completely in the right, but there are plenty of reasons why people cannot improve their handwriting. For example:
If I am writing with an eraseable pen, you will not be able to read it. Same thing for any pencil lead softer than 2H. (When I was in school, I usually kept some HB lead around for scantron tests.) Most pens smear as well. Why? Because I am left-handed, and I never mastered the incredibly painful, athritic-appearing, "hook-hand" writing configuration that some teachers insist we use.
And there are plenty of other physical conditions which can make handwriting difficult or impossible. If you know that your handwriting is bad, you need to figure out a way around it. Me, I print. A lot. And developed my own shorthand for taking notes in class.