They sold them at cost. Retailers don't make much on game consoles, which is why accessories are always over priced, which is why every retailers tries to push attachments with console sales. $381 to make a PS4 at launch sony was not eating a loss on them, retailers where probably lucky if they where making $15 per console sold, and sony ain't paying much to ship them when they're coming in on freight boats by the 1000s with super slow shipping.
I still don't get how you guys keep randomly thinking the removal of a disc drive that will probably cost Sony $10-15 per console is going to lower the price by $50. That is like some amazing made up feel craft going on in your head.
Edit and if you need clarification on how retailers work for game consoles here is a good read for you-
https://nintendosoup.com/much-money-...me-store-make/