@OP:
Profit. They do it even with low selling consoles, as they always keep HW dev & production costs under control so that at worst including SW, they get a platform overall lifetime profit (their only true failure about this was the Virtual Boy). Even on them their core 1st party titles sell a lot and they get all the profit from them, besides receiving royalties from 3rd parties instead of having to pay them if they themselves went 3rd party too.