EVERY game console company makes money on software thats sold on their system regardless of if the game is 1st party; they just receive a bigger chunk if they make it themselves. I dont have the exact numbers but when a game is sold a percentage goes to the developer, publisher, console company, retailer, etc.. When it was exclusive for the PS2, Rockstar did not get all the money from the GTA games. No a cut of that went to Sony for "allowing" them to use their platform to sell the game. Thats how it goes for every 3rd party game out there.
Despite its high price, Sony does lose money for each PS3 they sell bc they sell it at a lower price than it costs to produce. Same goes for Microsoft and the 360. Once tey get the console out there and in a home, thats it. All they need then is for the software to sell and as that happens, they begin to recuperate the losses