The song was written by Jimmy Webb, who is white. I never liked the song, until I read about what inspired it. Webb was dating a girl (Linda Ronstadt's sister Susan) and would meet her every day for lunch at the park.
Webb wrote another song, By the Time I Get to Phoenix, which Isaac Hayes did a cover of, even mentioning Webb by name in the song. Hayes, though a successful songwriter himself, often did covers of songs, many written by white songwriters.
I'm not sure it matters so much, but Steve Cropper was a guitarist who cowrote many soul classics, especially on the Stax/Volt labels.
Stax/Volt was founded by a white brother and sister, but it released music mostly by black artists, but gave them more of a free reign. It was eventually bought by Al Bell, who was black.
The musicians didn't segregate themselves, even if radio stations and record stores did.