Pinterest's potential market is much, much bigger than Github's will ever be.
And I guess you think Newspaper profits (used to) come from the price people pay for them.
The cost of ads has plummeted in the last few years, and I seriously doubt Pinterest would remain profitable if its primary revenue stream is ads.
Google's search advertising has shown targeted advertising is one of the most profitable business models ever. In some ways Pinterest is even more targeted than search.