Actually, developers don't make much profit, if at all, on games they develop. It is the publishers and the shops that make the big money.
Sometimes, the developer gets a fixed amount of money rather than a percentage of the actual profit of selling the game in the shops - in this case, the developer is
interested in the game getting pirated because that won't mean less money for them but it will mean more interest in their subsequent games (provided that this game of theirs is a success)!
Also, see how Micro$oft makes money indirectly from piracy: people are using (genuine or pirated) Micro$oft software all over the planet which forces other people use the same software, too, for compatibility reasons as in "How do I read your E-mail, document or run your software if I don't have the same operating system, E-mail software or office software as you do?" Many say that, at least in the past, Micro$oft was also
interested in piracy as it helped them with reaching their current domination.
(Sorry, as usual, I went the "side note" way again...

)