Mahouka sounds like a horrible fanfic. How do people even get an anime like that made? "Hey guys, I still have a lot of emotional hangups about high school. Could we create a show solely to compensate for that?"
It actually plays out as if he's some fanficcers mary-sue self insertion character
in his own series.
Imagine if Tatsuya wasn't meant to the main character, but
Leo was. Leo is in the "buttmonkey sidekick" role. But he's actually a lot more like a typical hero than Tatsuya is. So let's imagine that the original story was about
Leo but someone came along and wrote a self-insert fanfic where they upstaged Leo.
Leo is
far more like your usual anime hero than Tatsuya is: Leo is a straight-up good guy who is
far less than a genius, gets beaten up by tsundere girls (who actually like him) for accidental pervert stuff, and his main skill is pummeling bad guys to death with technomagical gauntlets (which look cool to the audience but the girls think are outdated and dorky). So you have your hotheaded hero who is not so smart but is quick with his fists and unlucky with women. Now that's a workable story there, purely because he's not perfect.
And Leo's skills are in line with the rest of the cast. Mahouka has a wide range of characters with different skills. But 99% of the time those skills aren't needed because Tatsuya magically gains whatever skill is needed to insta-win in any situation, and almost all his skills are never-before-seen Tatsuya-brand
tm magic that only works for him. That's like a mary-sue klaxon alert right there. Without Tatsuya constantly pulling rabbits out of his hat, they'd have to work as a team, and the "rules of magic" which the series is supposedly built upon would actual mean something. So, it really
does feel like Tatsuya is a fanfic author's self insert mary-sue which has ruined an otherwise workable story.