When both of the SpA and Atk is good, decent or sky-high, like those of Rayquaza and Salamence. Another example might be Diancie along with its powerful mega evolution, as both of its SpA and Atk stats are exactly the same. Also, another reason is for type coverage and for the sake of covering weaknesses. One example is Zeraora, as it also has a decent SpA stat and usually equipped with grass knot, to cover its main weakness, ground types. Magnezone is another reason, as Steel Beam can OHKO Hippowdon for the sake of loss of half your HP. Another reason might be to stop the opponent from switching into other mons, lets say, you pit Rillaboom against a Hippowdon. It's obvious the opponent's going to switch to another mon because he or she knows it's at a big disadvantage, but if you run Steel Beam Magnezone, like I do, the opponent will not know that Steel Beam will not OHKO it, and thus, doesn't switch in order to score off an earthquake or Stealth Rock. Magnezone can also run Body Press at the same time, because it uses its defense stat in damage calculation, which means it can also stall physical mons out with its high defense equipped with Iron Defense. Its SpA is also very high, so you equip t with a Discharge or Thunderbolt. And also when the attack is already high enough to make your opponents tremble in fear, so you focus on making that SpA stat to the max and vice versa. Let's say, Dragapult's Atk stat and SpA stat are both high. Specs Dragapult can be equipped with 252 SpA/252 Spe/4 Atk because it also has U-turn in its movepool in order to pivot in to checks. It can also be equipped in Will-o-wisp+Hex Dragapult, as it also has U-turn in its movepool in order to cripple the opponent with a burn then switching into checks. I know this because I've played OU for ages. Honestly, its only 4 months I've been playing OU. Some examples for both good SpA and Atk stats would be Mega-Absol, Mega Metagross and the ones that have the exact same EVs for each stat, such as Jirachi, Manaphy, and Arceus and some more. In conclusion, it depends on what role you want that specific Pokemon to have and what EVs it will hold in its very hands. Exception for those Pokemon who doesn't have hands. Sorry Ferrothorn.
Hope this helps :)