Idk how this is related to competitive battling but yanmega has a 4x weakness to stone, bad typing and is frail. Most priority attacks completely rek it and if you do use tinted lense u get outsped by mons like zapdos, thundurus etc. it's attacks don't do a lot of damage either.
4x weakness to stone: Tinted lens makes this an acceptable 2x weakness
Bad typing: Really not that bad, weak to 2 things (if you count tinted lens) EDIT: I WAS COMPLETELY WRONG and super effective against 5
Frail: Ok, yes, but you can't have everything, it's not meant to be a wall.
Priority attacks wreck it: Okay, this too.
Can be outsped by legendaries: Well I can't argue with that, but unless they can one-shot you use U-Turn. That only works up to a point, though. And those two you mentioned only outspeed it by a couple of points, which obviously doesn't matter if they both have speed boosting natures and are EV trained for it but that isn't always a given.
Weak attacks: Not really, for example Bug Buzz has 90 power and gets STAB. Air slash get STAB again, it isn't as powerful but it has a 30% chance of causing a flinch. Hypnosis could win you a game. Yanmega's Special Attack isn't that bad either.
Lastly, Hikamaru, you make some really good points that I can't argue against in good faith, namely that it gets outsped a lot without speed boost. But even so it still has pretty good speed, between 90 and 161 at level 50, so while it's a problem, it isn't enough of a problem to
EDIT: My weaknesses thing was totally wrong, yes, Yanmega isn't competitive, don't use him.