A. I am going to quote myself
It is not a character fault that writers have different opinions of what they should be and Marvel never reboots to clean inconsistenciesThe X-men franchise is famous for pulling these bad guys or unlikable characters and over time they change and you grow to like them
B. X-men are not super heroes much in the same way Lamar Jackson and Micheal Vick aren't "QBs" yeah they play the postion but what they do great isn't what you consider a QB to do. Yes the X-men are in the superhero genre and times in past act like Superheroes do in comics in most case X-men are the paramilitary arm of Xavier or Mutantkind. The X-men are more freedom fighters or a rebellion or movement than a group of heroes. Avengers and Justice League are out to save the world, The X-men are out save Mutants and since mutants live in the world there is a benefit to saving the world.
What you are saying about Magneto and Namor would have merit except over and over the world in Marvel treats mutants like they are Magneto for just being mutants. So very often mutants are force into position of being "bad guys" and when you are viewed bad guys already people who have done questionable things fit right in.
The X-men are superheroes? Okay name one supervillian that they regularly fight isn't another mutant, for sake this discussion alien or magic threat don't count. Heck I will help out with this Wiki list
https://en.wikipedia.org/wiki/List_of_X-Men_enemies
Yup that right Kang, Thanos, Ultron, Red Skull, Dr. Doom, Annihilus, Loki, Mandarin , Modok, Aim, Hand, Hydra, Baron Zemo, etc The X-men don't have one classic story where they fight against regular non mutant related threat that isn't related to mutant issue.
So another another Unpopular opinion The X-men aren't really superheroes and it is one of the big reason Cyclops, Jean Grey, Nightcrawler, Storm and some of the other popular X-men do not do good in solos.