It amazes me that many still believe that the PS4 beat the competition based on its games.. when in fact the PS4's early line-up wasn't that much better than the XB1 and WiiU's games. PS4 strived off indie games for the first couple of years and PS4's real big game came from Bloodborne which launched more than a year after the launch and sold around 3m copies leading into its 4th year on the market.. in other words a niche game not for everybody.
Point is PS4 was selling like crazy before the games arrived and in fact id argue that the XB1 had a better library of games during the launch years and had the critically acclaimed Respawns 1st game Titanfall which was considered one of the highest AAA rated games in its year. PS4 sold due to extreme hype, marketing and competition failing to deliver on the innovation front. Credit where credit is due, Nintendo and MS tried something difference with WiiU building on the Wii Motion faze and adding a new way to play with the Touch Pad and MS pushing Kinect 2.0 which was a huge success with the 360 and is in the Guinness Book of Records for fastest selling electronic accessories. They went with what worked and tried to double down on it. PS4 didn't change much from the PS3 aside from the power jump and the DS4 controller which all companies added new controller features etc.
The games was the icing on the cake however even if the PS4 didn't bring the games in its later years, it still would have sold well, much like how Steam is the most popular gaming app on PC and its not because of the AAA exclusives it rarely puts out yearly.