Why does the sentence 'People, who lived in the neighbourhood, were opposed to
the building plans' sound funny?
If you are using a relative clause to identify the person or thing you are
talking about, you should not separate it from the main clause with a comma.
In 'The man who lives next door is very helpful', the words 'who lives next
door' tell us which man is being talked about. You could only say 'The man,
who lives next door, is very helpful' if you had already identified the man
in some other way. Use commas to separate off a relative clause that gives more
information, which may be interesting but is not essential if someone is to
understand what you are saying, but don't use a comma if the relative clause
is essential to the meaning of the sentence.