Yes, they already made a profit.
I'm going to throw some random numbers here.
Let's say the total cost for everything is 60 million (including development, advertisement, etc.)
Let's say they make around 30$ profit per game sold.
($30 x 2.8 million) - $60 million = $24 million in profit
At some point, something must have come from nothing...
...nothing can come from nothing...