The very short answer: they do it just the same way that you learned all that difficult grammar in your own mother tongue.
Slightly longer:
How does anyone learn their native language?
Well, according to linguists, they do not.
The process of getting to know how to speak your mother tongue is called acquisition, not learning.
Learning is what other people do when they learn the language as a second (or third, etc) language. They learn the rules, the grammar, and they try to apply them.
Young children subconsciously analyse the words and phrases they hear around them, and they build up a "grammar" in their head, as well as a dictionary, a thesaurus, enormous lists of collocations, etc. They don't actually sit down to study, they just absorb and analyse.
So a native speaker knows that he should say he works instead of he work, and even when he encounters a verb that he has never seen before, he knows the third person singular will get an -s in the simple present.
The amazing thing is that he knows that, even if maybe he does not know anything about grammar. Even if he doesn't know what a "verb" is, what "simple present is", or "third person singular". Even if he has never seen a grammar book, he will be able to correctly say he (new verb)s.
Just look around you at any young kids. You may think that your mother tongue is easy, because even little children speak it very well. But it's not. It's as easy or difficult as English is, and those kids (and you, when you were little) are doing what children everywhere do: they build up an understanding of the grammar of their mother tongue without even realizing it.
Ask a five-year old why he just conjugated that verb correctly, ask him in which grammar book he saw the rules for that, and at best you will get a blank stare.
You had discovered an enormous amount of grammar by the age of three, just like any kid, in any language.
This question reminds me of this old joke:
I am so glad I was not born in China, because I don't speak a word of Chinese!
Both to and for can be used with liable, but they are used in very different circumstances.
Liable to is usually seen as part of the form liable + infinitive, and indicates what someone is likely or probable to do:
He is liable to want a beer with his dinner.
Liable for indicates someone has a debt, legal obligation, or responsibility:
Since he crashed my car, he is liable for the cost of repairs.
In your example sentence, both of them would use "for".
Edit: I've actually now found a number of example sentences in British English with "liable to" used in the sense of a legal obligation, just as with "liable for". So the first one may be acceptable either way in BrE - although as an AmE speaker, I would say that "liable for" is, at least on this side of the pond, the normal phrasing when discussing legal obligations.
Since the original sentence is British English (American English would not use "transportation" in that sense), I will defer to people with more knowledge of BrE on which they would prefer.
Best Answer
In this case, "by" is the correct preposition - "People were shocked by his death." I agree, English can be a little confusing.