This is the main reason for the change.
It's okay for something to be good, but it's not okay for something to be so good that you put yourself at a huge disadvantage when you don't use it. We'd like players to be able to use a variety of teams without feeling like they're wasting their time/money. The monetary reward from a Shedinja run was also inappropriate for the low amount of skill/time/items it required compared to a more standard team. Winning without cheesing it is hard, but it's supposed to be hard.
As for addressing the problem, because Shedinja's strength came from a unique gimmick, it can't be handled in the same way as other big threats. Invulnerability is also something that predictable AI will always struggle with even after it learns how to use all of its moves. At first, we trialed just introducing more Rocky Helmets, super-effective moves, and status moves to the teams. These changes lowered the quality of the builds, they had no business being there outside of potentially stopping a Shedinja sweep, and it still wasn't enough to be effective so we needed to take it further.
When faced with the options of adding a bulky rock/steel/ghost type with a Rocky Helmet to every single team (which would just get trapped or have its item tricked away) or nerfing the ability causing the issue, it was clear which was the more reasonable option. When you have to balance the game around a single species to such a degree, there's clearly a problem, and it's likely not with the builds.