First of all some great, classic beers do not follow this pattern. For example Sierra Nevada Stout contains no roasted barley, while Great Lakes Edmund Fitzgerald Porter does. With thousands of porters and stouts produced today of course I could just cherry-pick some examples, but in Designing Great Beers Ray Daniels lists the occurrence of various dark malts in a survey of commercial stout and porter recipes. Out of 14 stouts he surveyed 4 contained roasted barley exclusively compared to 3 that used black malt exclusively (only 1 used both). Out of 31 porters surveyed a similar pattern emerged, 11 recipes contained solely roasted barley compared to 10 with just black malt (again only 1 used both). It seems clear from this analysis that as far as commercial brewers are concerned roasted barley and black malt are interchangeable ingredients that accomplish very similar goals in recipe formulation.
Sure (I can hear you say), that may not be the case today, but what about the historic origins of the styles? Ron Pattinson gives a great deal of historical detail to this difference as well in this post on Shut up about Barclay Perkins. He comes to this conclusion after analyzing historic recipes for stouts and porters from the same brewery, "So what was the difference between Porter and Stout for Whitbread? The amount of water used."
The BJCP Stout guidelines only specifically call for roasted barley in one stout sub-style (Dry Stout - "While most commercial versions rely primarily on roasted barley as the dark grain, others use chocolate malt, black malt or combinations of the three."), the rest of the styles simply mention something like "Dark roasted malts and grains." Jamil's (award winning) sweet stout in Brewing Classic Styles does not have any roasted barley in it, so the BJCP judges don't think roast barley flavor is necessary for every style of stout. At the 2009 GABF Flying Dog's Gonzo Imperial Porter (which does not contain roasted barley) won a gold medal as an Imperial Stout, apparently those judges can't taste the difference either.
The point is that the flavors created by black patent and roasted barley are very similar. In many cases the only difference between porters and stouts is the name on the label, if it is dark and roasty a brewery (or homebrewer) can call it whatever it wants without being incorrect.
If you agree (or disagree), let me know in the comments.