As for my understanding, prior to the industrial revolution society structures were completely different, where the community and the family took care of everything for the individual (for good and bad).
I.e., jobs, 'law enforcement', 'education', juridical system etc. The state/country/kingdom didn't really intervene on how you run your community.
So why did we (they) paid taxes to the government for? was it just as a protection service you pay today to criminals?
I.e., jobs, 'law enforcement', 'education', juridical system etc. The state/country/kingdom didn't really intervene on how you run your community.
This is not true. There were many specialized functions performed by the state. Consider pre-industrial Qing China, which is a good example of a nation suffering from acute undertaxation. National revenues as a percentage of GDP were estimated to be under 5%, but in practice it turned out that this was grossly inadequate to pay for everything the state needed to do and unofficial local taxes were collected to supplement the meager central budget. (Overall tax levels were still relatively low.) This of course led to a situation where corruption became nearly indistinguishable from normal bureaucratic function. The state found it necessary to create the legal fiction of the 'meltage fee' to officially endorse some extra level of local collection.
The state performed numerous functions. At the national level, it maintained the national army (about one million strong during the Qing), which was regularly engaged in long distance campaigns at high altitudes. It paid for upkeep of the Imperial household itself which maintained numerous residences in addition to the forbidden city. It paid for transportation infrastructure (canals mostly) that linked parts of the country. Notably the Grand Canal connected the Yellow river to the Yangtze and therefore connected the two main economic regions of China. It should be pointed out that parts of China during the Qing were not agriculturally self-sufficient, the maintenance of inter-regional transport links was of critical importance. Cheap transportation allowed regions to specialize, some areas producing food, some areas producing cash crops, some areas producing manufactured outputs. It paid for the administration of the exam system which served multiple functions in indoctrinating elites in the official ideology, identifying talent for high office, and allowing a path of upward social mobility (as even without office, examination degrees conferred real, material benefits).
At the local level there were also many specialized bureaucrats. The Qing dynasty official ideology promoted the resolution of local issues by local families, and policy endorsed it accordingly, at least in name. For example rural villages were organized by the baojia system where groups of farming households (in hierarchical groups of 10, 100, 1000) were supposed to select one among them to watch over the lot, with the position rotating on a regular basis. In practice the position of village headman became an unofficial governmental position staffed by bureaucrats who worked full time and collected unofficial taxes. The competence and honesty of the headman of course varied wildly from one jurisdiction to the next. In rural areas particularly the state needed to maintain irrigation works that were critically important to the land scarce economy.
At a higher level each county had a magistrate's office, headed by an officially appointed employee of the state. Each magistrate would be in charge of a county of anywhere from a hundred thousand to upwards of a million residents. The magistrate typically spent more than half of any working day resolving civil litigation, despite the fact that litigation was highly frowned upon. The office of a magistrate could employ hundreds of people for various tasks (including of course tax collection itself). Perhaps most crucially at the local level the government maintained the national granary system which was meant to provide relief in case of drought or other disaster. The granaries were meant to be stocked with enough grain to feed at least a regional population for several weeks. The depletion of granary stocks in the late 18th century was a contributing cause to 19th century crises.
TLDR: a lot
EDIT: Sorry slight correction, I oversimplified the granary system. They were meant for more than famine relief. Local magistrates were also in charge of reporting local prices to the national government, and the granary system was also meant to smooth out price fluctuations even when nobody was threatened by actual starvation. By buying low and selling high granaries sometimes turned a profit instead of always draining tax revenues.
Well this is really a broad question because this encompasses all human history before the IR. if you are talking serfs in Europe they payed taxes, in the form of labor and a percentage of the crop to the lord, for the protection of the lord as well as the land they lived on. while it did depend on the era the local lord did rule the area so your taxes where being used to help him govern you as well as pay his taxes to the king.
If you are talking those in the cities you paid taxes for basically the same reason we do today. for services and protection.