Online sale have reduced distribution costs and unlimited scaling compared to physical media, so successful games are far more lucrative now than they were and unsuccessful games don't have losses from overproduction and returns from stores.
If selling at the current rate wasn't profitable, gaming companies would have stopped making games by now.