Yeah, although tbf some people struggle with tests and for them homework brings up their grade, and it might help some people learn. But I 100% agree that it ought to be optional and shouldn't be able to tank your grade if you demonstrate an understanding of the material.
I can sympathize with people who work hard and still score poorly on tests. But if someone's a quick learner and they're motivated by learning then naturally they're going to put in less effort once they understand the subject, and making grades a reflection of effort rather than understanding feels unfair to people like us.