Difference between "society" and "the society"

Solution 1:

From Wikipedia

Human societies are characterized by patterns of relationships between individuals sharing a distinctive culture and institutions. Without an article, the term refers either to the entirety of humanity or a contextually specific subset of people.

I would restate one part of the original question as
'"society" (without "the") refers to human society in general'

and, the example should read
"socialization is the process of learning to live in society"

The phrase "the society" is used in areas of study such as anthropology, political science and sociology when referring to specific groups.

Again from the Wikipedia article, discussing a particular group

This nobility organized warriors to protect the society from invasion.

In this case, "the society" is used to limit the scope to the group under discussion, and not all of humanity.


Edited to respond to OP's edit of original question

In "Soldiers protect society" the lack of an article preceding "society" makes it a statement about human society in general. As such it can stand alone without other context.

"Soldiers protect the society" seems taken out of context. It begs the question which society?

(Note: The following example statements are not meant to be historically accurate.)

In general, soldiers protect (human) society.
In ancient Rome, soldiers called centurions protected the (Roman) society.
In ancient Japan, soldiers called samurai protected the (Japanese) society.

Solution 2:

I would read "Soldiers protect the society" as a generalisation of John Satta's phrase, meaning that British soldiers protect British society, German soldiers protect German society, etc . "Soldiers protect society", on the other hand, is a more interesting point, implicitly contrasted with "Policemen protect individuals". So soldiers are not expected to save individual lives (indeed, when the army is called in to a problem, you would expect more casualties rather than less): they are protecting the intangible network called 'society'. Declaring martial law prevents (for example) looting and random shootings, at the expense of suspending civil freedoms and approving the summary execution of looters. Whether you think this is a good thing or not, the change means society still exists, rather than breaking down into anarchy.

[I realize this is a controversial view: I am not saying I agree with it, just that this is (in my view), the meaning of the phrase.]