There is likely little to no relation between both examples you've mentioned. If debating philosophy throughout human history you'll find several examples of schools of though or societies that approached modern concepts of what is today seen as left and right. However I've never seen any scientifically backed claim to the same origin for those concepts.
To better understand the context of what is left and right nowadays...
Let me start by saying I'll be using the Wikipedia definition of the several relevant schools of political philosophy (because it seems, to me, accurate):
Anarchism: Anarchism is a political philosophy that advocates
self-governed societies based on voluntary institutions. These are
often described as stateless societies, although several authors have
defined them more specifically as institutions based on
non-hierarchical free associations. Anarchism holds the state to be
undesirable, unnecessary, and harmful.
Communism: In political and social sciences, communism is the
philosophical, social, political, and economic ideology and movement
whose ultimate goal is the establishment of the communist society,
which is a socioeconomic order structured upon the common ownership of
the means of production and the absence of social classes, money, and
the state.
Social Democracy: Social democracy is a political, social and
economic ideology that supports economic and social interventions to
promote social justice within the framework of a capitalist economy,
as well as a policy regime involving a commitment to representative
democracy, measures for income redistribution, and regulation of the
economy in the general interest and welfare state provisions.
Also important are the two most relevant economic systems in the modern world:
Capitalism: is an economic system and an ideology based on
private ownership of the means of production and their operation for
profit. Characteristics central to capitalism include private
property, capital accumulation, wage labor, voluntary exchange, a
price system, and competitive markets.
Socialism: is a range of economic and social systems
characterized by social ownership and democratic control of the means
of production,6 as well as the political theories, and movements
associated with them.7 Social ownership may refer to forms of
public, collective, or cooperative ownership, or to citizen ownership
of equity.
For some context on how ancient sources are seen int the light of modern philosophy...
Taoism is, indeed, seen by some people as an anarchist concept (link):
Taoism, which developed in Ancient China, has been embraced by some
anarchists as a source of anarchistic attitudes. The Taoists sages Lao
Zi (Lao Tzu) and Zhuang Zhou whose philosophy was a kind of philosophy
based on a "anti-polity" stance and rejection of any kind of
involvement in political movements or organisations and developed a
philosophy of "non-rule" in the Zhuang Zhou and Tao Te Ching and many
Taoists in response lived an anarchist lifestyle.
in wikipedia
Its not the only example. Author Leo Tolstoy (writer of War and Peace) is a well known example of a person who is believed to have been an advocate of a form of anarchism (based in Christianity):
Tolstoy believed being a Christian required him to be a pacifist; the
consequences of being a pacifist, and the apparently inevitable waging
of war by government, are the reason why he is considered a
philosophical anarchist.
If you keep digging you'll find many other examples mentioning Jesus, Siddhartha, among other religious or ideological figures.
As for the evolution to what is today mainstream Left and Right...
Most modern democracies today are (in terms of philosophy, and not how they are usually called by political commentators; see the definitions at the top) Social Democracies where the "Social" is either a bit less (USA, UK, Chile, etc.), leaning towards capitalism, or a bit more (Sweden, Denmark, etc.), leaning towards socialism.
This weird mixture of systems and philosophies is the consequence of events that had a significant impact in modern society. The first example (that I know) of a true social welfare system was made in "Bismarck" Germany (State Socialism, 1880s), which at the time it was monarchy. The really important point here, however, is that Bismarck implemented these "Social" reforms to prevent socialist parties and trade unions from gaining ground. See Anti-Socialist Laws:
The legislation was passed after two failed attempts to assassinate
Kaiser Wilhelm I by the radicals Max Hödel and Dr. Karl Nobiling; it
was meant to curb the growing strength of the Social Democratic Party
An example of an "ideology" implementing the concepts of another to avoid loosing power. Other great example (this time prompted by economical circumstances) is the recovery of the USA from the great depression and the Social Security implemented by Roosevelt [Second] New Deal.
Its important to notice that nowadays we see a lot of "Capitalist" this (typically USA), and "Communist" that (typically Russia/USSR). Neither is really accurate. Russia did indeed implement a version of State Socialism (forget the philosophical Communism, it was just a convenient word to legitimize further developments) which quickly declined to a Totalitarian regime. And the USA has a fairly comprehensive mechanism of social welfare with strong regulations in many areas (inf fact I don't know any example of a fully functioning Laissez Faire).
So the conclusion is...
This is a personal opinion from my analysis of history. But the origin for the modern definition of what is Left and Right is probably the late 19th century Germany (particularly in Europe). In the case of the USA I would argue that the Great Depression has had a fundamental role. A lot of very important philosophy was produced during the French Revolution but its actually complicated to make an assessment of its actual role for modern definitions (specially because Napoleon Bonaparte came immediately after, and the period itself was extremely turbulent).