Orlando, I would say those two things do have an educational purpose.
Spelling tests force pupils to learn the correct spelling of words. If you don't set tests, pupils do not have an enormous motivation to learn spelling or, indeed, vocabulary. I always think it is important to mix the two.
There is this strange belief that pupils pick up such skills through some sort of osmosis; in my experience, they don't. It is really quite surprising how many times a student may read a word, yet when it comes to writing said word, they make mistakes.
Pupils/students need to practice; they need to revisit words and letters. I personally think there should be more repetition built into teaching and learning spelling and vocabulary -- purely so that spelling becomes coded into your procedural memory, which is really what this sort of thing is all about.
Although I have to say that writing a word out in the context of a viable sentence again and again until you cover two sheets of A5 is possibly one of the best ways to learn both meaning and spelling. It is far less stressful than test conditions and works just as well for procedural memory.
Homework, again, works well when it is about reinforcing rules or codes through repetition or practice, say, a page of sums using a concept you have learnt that day in class. The different environment helps here too as you are forcing your brain to use and apply the code in a different set of circumstances; it can be quite surprising how your brain can compartmentalise certain items of information as only pertaining to one particular environment.
It is all about insulting those neural connections. 
And, yes, I come from the school of thought that believes the best way to succeed in a discipline is to put in the necessary hours of focused "practice" or utilisation of a code or concept. The way the British school system works does not really allow for this in any subject during school hours, so the only other option is for some of that practice to occur outside of the school environment -- ie. homework.