Porter got its start as an answer to the higher hopped pale ales gaining popularity in Britain among the town gentry in the early 18th century. Brewers took their signature sweet brown beer as a template, tweaked and adjusted it until they had something brand new. Something that could possibly hold its own against the invasion. They had a strong, well-aged, and higher-hopped dark beer.
The beer became especially favored by the dock and street workers that loaded and unloaded ships and carried goods into the city. Because of this popularity, the beer was named porter. But, the popularity of porter beer was not confined to this single group, or for that matter, to its country of origin.