The reason for the reliance on advertising for revenues is because of the shift of ad dollars to the internet from old media such as radio, print etc. Advertising seems like this massive source of revenue waiting to be tapped. It is really a temporary illusion of growth. Overall ad spending is not increasing dramatically, it's only being reallocated. Once the shift to digital is complete, digital advertising will track GDP growth (similar to offline advertising today). But complete allocation will take several decades more.
A second reason for this reliance is lack of competition. Only a few companies have the scale needed to be attractive to advertisers. Hence, all ad dollars go to these companies. The success of these companies creates a lot of me-toos. Once there are a few more companies with the scale of Google/FB fighting for the same dollars, advertising will cease to be as attractive.