How much of the cartridge sale was profit to the developer?
The hardware of the cartridge cost money. Distribution to retailers cost money. The retailers took their cut.
I wouldn't be shocked at all if the publisher's net revenue per game is significantly higher in real dollars than it was in the NES era.