To be fair, I'd bet that a bunch of third parties are gonna backstab Nintendo with the NX like with the WiiU, because muh hard console to develop for or some excuse.
There actually is some truth to that. Porting is easier than studios say but harder than most players think. In programming, we use what are called "libraries". These are collections of prewritten modules of code. Some of these exist across all implementations of a programming language (called the "standard library"), but rarely do they deal with graphics in such a way that would be useful for game development, if they deal with graphics at all.
So, each console manufacturer provides different libraries for their system, and they're each a little different. They're basically the same, but programming is the art of giving very, very, very specific instructions, so "a little different" can be the difference between a game that runs butter-smooth and one that barfs all over your screen, if it will even compile. In some cases, a simple find>replace can fix the problem, but sometimes the programmers will have to fix every occurrence of the problem differently.
On top of all that, the hardware is slightly different too. Operations that can be done in tens of microseconds on one console may take a hundred on another. This problem is mostly moot in modern systems: The PS4 and XBOne run basically on a x86_64 (PC) architecture, while Nintendo's Gamecube, Wii, and Wii U uses PowerPC. I'm not knowledgeable in hardware at all, and I've only ever worked on PC code, but I'd be surprised if that didn't have massive ramifications for the sort of high-performance computing required for games development.
If all of that wasn't enough, the simple facts are that Nintendo's consoles don't have the size of install base as Sony's and Microsoft's. The games can be ported, and it's not exactly hard, but it's expensive and the profit margins are slimmer. Resources, as these companies see it, can be better allocated by working on more games than by trying to get the same ones to every platform. It's not a question of profit, but of profit margins.
Of course, there are surely political reasons too, on both sides of the fence. Nintendo (or at least America's branch) are more protective of there trade secrets and brand image, so dev kits aren't as robust (a problem with the Wii U), their contracts may require the use of certain gimmicks like motion control, and they're more likely to veto something that doesn't fit their image. Big studios obviously don't like this, and see that they have a vested interest to see Nintendo fail until Nintendo kowtows to their demands. Large studios can also use platform availability as a branding tool. Nintendo has a reputation as the "kiddie console". We all know it's BS, and largely the result of Sega's and Sony's 90's marketing (and the Wii), but that's how the public sees it. So if somebody asks a friend to play the hottest new AAA game on their Nintendo console, big studios think it could hurt the game's reputation. This isn't even getting into backroom exclusivity deals or collusion or other potentially illegal things.
But my point is that there are technical reasons for "available on everything but Nintendo". It really sucks, and in many ways has become tautological, but when studios say "it's hard to develop for/port to this system", they're not lying, even if they're not telling the whole truth. There are more technical reasons I could give, or at least guess at, but hopefully this is enough.
Studios want easily portable games that can be run on powerful hardware, Nintendo's last two offerings have been weak systems with gimmicks. Gimmicks are about as non-portable as it gets, and the NX looks like it's gonna be another gimmick system. There may not be a Nintendo NX U. I don't think Nintendo will go under, but if the NX flops like the Wii U I doubt they'll stay in the console market.