I'm guessing Sony was always willing to take a little bit of a loss on this movie. While $500 million obviously isn't unheard of for a movie, it is a particularly difficult climb for a non-family comedy. Over the past decade, the highest grossing PG-13 or R comedy I could find was
Tedin 2012 with around $550 million globally - and that's the only one I could find that made over $500 million. The highest grossing comedies in other years (eg 22 Jump Street, The Heat) typically come in more between $200 and $300 million.
However, Ghostbusters wasn't just about selling a movie, but creating a new franchise. That's why they've invested more heavily in advertising than any other comedy I've seen in recent years. They started talking about a Ghostbusters cinematic universe after this one was barely even off the ground. If they had to take a loss on this movie but it allows them to create something they can milk on a yearly basis, it isn't a bad trade-off. The question, though, is how much of a loss they're willing to take before they go back to the drawing board. But, now that they wrested control from Ivan Reitman, another Ghostbusters movie is inevitable given how desperate Sony is to create a cinematic universe. It just remains to be seen if it'll be these Ghostbusters again (I'd be really curious to know how many movies the actresses had to commit to).