Setting homework with the intention of encouraging students to do well at tests is beneficial to students as much as it is to teachers and schools. National tests are a way of assessing whether students are at the level they should be, if they do well on the tests, that is a good thing. Therefore, a 'win' for the teachers and schools is also a great deal of learning for the student, the two need not be separated.