yes, actual pieces would be better than Hanon. But Hanon in my opinion is for speed and accuracy, as someone already mentioned here. So in that respect, Hanon is great.
Hanon is easy to familiarize oneself with, saving you a lot of study time. That takes much more time with actual pieces, for sight reading and memorizing the piece.
With Hanon, you can quickly understand the patten from the beginning, and you just go up and down the keyboard, concentarting FULLY on SPEED, FINGERING and ACCURACY.
I admit, it's very mechanical, but we need that too!! Especially us beginners. It's also good for warm ups.