The members of a company are generally its owners or shareholders, and the company exists to carry out its objects - if the objects of the company are commercial, that usually means providing a return to shareholders.
But the point made by Thiel was not meant to be some existential musing on the purpose of companies generally. The proposition that "companies exist to make money, not lose it" is "elementary" because he is there referring only to companies with commercial objects. In other words, 'for profit' companies exist to make money, and at least for those companies it is a mistake to focus on other metrics to the exclusion of profit.
As for the historical relationship between the development of company law and commerce, a good place to start would be the history of limited liability companies and corporations (in the UK, US and elsewhere) and the effect of limiting liability on entrepreneurship.
A club is usually focused on providing value to their members, rather than the world at large; I'm not sure how it's similar.