She did it for the community.

Literal

She [topic-は] community [for-のために] that [object-を] did.

地域社会 ('local community') is a Sino-Japanese compound: 地域 (area/region) + 社会 (society). のために ('for the sake of') marks the beneficiary. The sentence is simple but the word 地域社会 elevates the register — in casual speech, みんなのために ('for everyone') would be more natural.