It wasn't only nintendos own doing though that got them out of the home console marketAnd so you want to remove them from the console market, sure. But it still doesn't change the fact it wasn't by the hands of Sony but by Nintendo's own doing.
They got beat quite bad during the 90s and early 2000s that they pivoted to the wii.
And that sent them on a journey of trying to figure out unsuccessfully what they wanted to do in home consoles.
While it's true that WII U was nintendos own doing, you don't just look at that in isolation you look at what sent them down that path, and sony absolutley played a hand in sending them down that failed path.