Browser Profit?

I still do not understand how companies profit from free browsers. Is it just because Bing is the default search engine? People change that pretty quickly. How does a company like Mozilla make money off of Firefox? Apple and Safari?

Thanks!