So, my expertise is in the United States, so that's what I'll focus on. I suspect that the trends are similar in the UK and Western Europe, but they have different laws and cultural norms surrounding the press across the Atlantic, so I couldn't say for sure.
My major sources are:
Schudson, Michael. Discovering the News: A Social History of American Newspapers and
Schiller, Dan. Objectivity and the News: The Public and the Rise of Commercial Journalism.
In the eighteenth century and early nineteenth century in the United States, newspapers did not really exist as they are known today. They were elite publications, usually quite expensive, and they were published by and for a specific group in order to further a specific agenda. In practice this was usually a political party of some kind. Since suffrage was fairly limited at the time (usually to property-holding white males), this model made sense, as fewer people were interested in the goings-on beyond their local area at the time. When these newspapers, which were usually printed on expensive linen-rag papers, had advertisements those advertisements were not the main source of revenue. Subscription fees were. These newspapers were frankly partisan, and hewed to no ideal of "journalistic objectivity" as we know it today.
The rise of mass-circulation newspapers from around the 1830s was enabled by a series of revolutions, some technological and some social. First, the technological: The invention of reliable wood-pulp papers made publishing a lot cheaper, enabling much larger printing runs of a variety of paper items. Since wood-pulp paper is much more disposable than linen and other cloth papers, this medium was perfect for a mass-produced newspaper. Secondly, a little later on, the invention of the telegraph (and to a lesser extent railroads, canals, and all the other transportation revolutions of the first half of the nineteenth century), allowed for the fast and reliable transmission of news from one distant locale to another. The ability to print news that was actually up-to-date to within a day or two was a huge boon to the idea of "news" as a category developing.
Finally, there was a social revolution. In the U.S. this has traditionally been called the Jacksonian Revolution. Common people became more involved in politics and social issues, in part because of new communications and publishing technologies, in part because of a rise of affluence, and in part because of an increase in manhood suffrage. The "penny press," which included such papers as the New York Sun, New York Herald, and slightly later the New York Times rose to serve this market with a fast, cheap, and often wildly sensationalistic product. In order to sell these papers for the low price of $.01, the papers sold advertisements, primarily for things like patent medicines, but also for art and cultural exhibitions, auctions, and all manner of things that might interest a nineteenth century person (fugitive slaves is another).
So, in summary, one might argue that the early, pre-wood-pulp papers were a kind of public service, though they largely predate the idea of a public. In fact, the modern idea of a public is in large part a product of early newspapers. The modern press has always been bound up with advertising, for better or for worse.
In addition to the sources above, you might read Daniel Walker Howe's What Hath God Wrought, a wonderful general history of the antebellum period in America.