One should not separate a title from a name with a comma. The newspaper that did so was in error.
Where a comma would be used is when a name is preceded by a noun clause, like this:
The officer who responded, Sergeant Smith, stated ...
A police officer responded to the call. That officer, Sergeant Smith, ...
This is called apposition. The writer of ...
1.Mayor Steven Smith attended a charity event.
2.Wildlife Liason Officer, Lorraine Nelson, attended the scene of the incident.
These examples were taken from a newspaper.
How does the appositive, in this case an occupation, Mayor differ from Wildlife Liaison Officer, in terms of it taking commas? They are both similar in that they are both occupations and ...
You think that's confusing, how about this except from "The Road" by Cormac McCarthy, with nary a comma to be found:
When it was light enough to use the binoculars he glassed the valley below. Everything paling away into the murk. The soft ash blowing in loose swirls over the blacktop. He studied what he could see. The segments of road down there among ...
In the example sentence, we have this:
I think there is an electrical problem (independent clause), which prevents its motor from working properly.(dependent clause)
The first part stands on its own, while the second part does not.
The question of a comma or not is something separate. Also, at least in the US (although not the UK), if you removed the ...
It's an adverb (more specifically past participle adverbial phrase as @Lambie says) modifying either "chose" or "give." Reference.
It can answering "how?" to either of the questions "We chose X" or "options that give you the best..."
You also asked "What are the functions of commas"
In this context the commas are a sign of a side remark, a parenthetical statement that is used to provide further information. If you were reading this sentence aloud you would have a slight pause for the commas and a possible inflexion change.
A simpler way to write the sentence would be to move this ...
Information in sentences that is nonessential (or nonrestrictive) is set off parenthetically (with commas, dashes, or actual parentheses), or by appositives or additional information introduced by commas.
As such, the following occurs:
The woman, who was walking her dog, was tall.
→ The woman was tall.
In order for the fact that she was walking her ...
I think there is a word missing in the sentence, but not the one you think it is.
I would expect
Three things in life that, once lost, are hard to build up.
Once lost is a "small clause", equivalent to once they are lost; it is also common enough to qualify as an idiom.
Note also that this is not a full sentence, since everything after "that" is a ...