You had situations like the famous "Brill Building". Just a big place cordoned off into basically cubicles - each containing a couple of chairs, a desk, and a piano. Songwriters sat there and cranked out tunes daily like accountants. The songs would be shopped through whatever group was available.
The idea wasn't to sell recordings (which were not widely available yet). It was meant to sell sheet music. A group would perform it, it'd make the radio, and people would buy the sheet music at the store. As a result, several groups might record the same tune. It didn't matter.
I'm not a real big fan, but I respect The Beatles who were among the first to say, "We wrote some stuff. We're gonna record our own stuff.". Their momentum due to their fame allowed them to really change how an artist related to the music they made.