This is the personal a.
In Spanish, when the direct object is a person or people, you usually put a before it.
Here, todos refers to all people / everyone, so Spanish uses a:
Compare:
Since todos means people here, a is needed.
Here, todos means everyone, all people, or all of us/all of them depending on context.
Literally, todos is all in the masculine plural form, but in Spanish the masculine plural is also used for:
So in this sentence, a todos is a natural way to say everyone.
Todos is used because it can refer to:
If you were talking specifically about a group of females, you could say a todas:
But in a general statement like this, a todos is the usual form.
No, that would sound wrong in standard Spanish.
Because todos refers to people, the personal a is required:
If the object were a thing, there would be no personal a:
Here it works as a pronoun.
That is because it stands on its own and means everyone / all people.
Compare:
So in La ley protege a todos, it is not directly attached to a noun, so it is functioning as a pronoun.
This is the normal, neutral word order in Spanish:
So it follows a basic subject + verb + object pattern.
Spanish can change word order for emphasis, but this sentence is the most natural and straightforward version.
It is the present tense, and here it expresses a general truth or general principle.
So La ley protege a todos means something like:
Spanish present tense is often used for general statements like this, just as in English.
The sentence breaks down like this:
So the structure is:
Subject + Verb + Direct Object
More literally:
This is a very useful basic pattern in Spanish.