As has been stated, the Xbox One retains the title of most expensive console this gen (at launch).
PS4 is where it is because of a perfect-storm of good circumstances. They launched the mid-range console with a price right down the middle (with hardware that was slightly more powerful), while Nintendo and Microsoft made some horrible choices during the launches of both systems.
All that said, the BIGGEST thing Sony did this gen (and I'm not sure why this doesn't get more recognition) is that they made a console with the DEVELOPER in mind. Consumers are fickle and don't always really know what they want, and execs are many times out of touch with their core demographic anyways. So Sony went and made a console that was far, far, FAR easier to develop for than their previous hardware.
They brought the devs, the devs brought the customers.