Magneto is an excellent villain in the way that Thanos tries to be - we can empathize with Magneto and understand his motivations for what he does. It's easy to see why he feels the way he feels and because of that his actions are justified. With Thanos, they tried to create that same level of motivation/determination in the history of Titan and what happened. however, with all the powers of the universe, couldnt he just as easily create new planets, new resources, new technology to allow populations to thrive without genocide? For Magneto, he didnt think humans would ever understand him or accept him, because he had seen first hand what being an outcast looked like.