Budget is a huge factor. It's the reason Justice League is a flop despite pulling roughly $650 million at the box office. It's all about the break even point. Justice Leagues break even point was reportedly around $750 which is absurdly high.
Here's an interesting tidbit I found:
Split, by
M. Night Shyamalan, was the year's most profitable film in terms of
return on investment (ROI), having generated over 2,000% ROI. It is the 11th film to cross 2,000% ROI, and the first film to do so since 2015.
[4]
haha according to that link Deep Throat has the highest return on investment of any theatrical movie.