It dates to the beginning. Nintendo had some restrictive policies on NES and to a lesser extent SNES. These had some good impacts and helped the industry rebound and thrive, but some third parties didn't like them. EA in particular felt the platform shouldn't be the most well-known thing, but rather the game developers. That's why for a time back then they would put the lead developer's name in the game title, like a movie star. They said ideally the system would just be a nameless box. But other, more dominant 3rd parties enjoyed their relationship with Nintendo.
Then Nintendo had the dust up with Sony and failed to include a CD ROM drive with N64. This meant that many titles weren't easily doable on N64. Sony swept in and published FF7 which was a major title for Japan and other third parties followed. EA and others were more than happy to move to an environment that lacked Nintendo's first party competition.
Following that, Nintendo made some very questionable hardware decisions like using mini-discs in GCN and low power in Wii and Wii U. These just compounded the problem.
TL;DR:
Two issues:
1. Some companies don't want to compete with Nintendo 1st party (EA)
2. Nintendo alienated the ones who wanted to be on their system by using cartridges on N64.








