Why is "to get" sometimes used where "to be" could be used?
You can use forms of get instead of forms of be as an alternative way to formulate the passive voice. Passive voice clauses constructed with get are less formal than those formed with be, but otherwise have the same meaning.
However, you can’t use get for stative uses of the passive voice, where the passive indicates the result of an action. You can only use it for eventive passives, where the passive indicates an action. Here are examples of the stative passives where get is not grammatical:
100 votes are required to pass the bill
* 100 votes get required to pass the billHe was rumored to be a war veteran.
* He got rumored to be a war veteranThe plums were intended for breakfast.
* The plums got intended for breakfast.A vacuum is abhorred by nature.
* A vacuum gets abhorred by nature.
The usage is correct, if not always formal. Using "to get" puts a more active spin on the result. While the use of "to be" creates a passive-voice construction, the use of "to get" creates an active-voice construction with an implied subject -- that is, it emphasizes that someone specifically caused the action, rather than that it just happened on its own somehow.
This usage is correct, but informal. It is freely used (and extremely common) in less formal kinds of writing and speaking, but is avoided in the most formal forms of writing.
As for "why", I don't think there is any explanation other than the fact that get + <past participle> is slowly displacing be + <past participle> for the passive construction.