My late father-in-law, who actually managed to get writer's credit on a few songs he wrote with Johnny Cash – a few of them thankfully very important – once very candidly told me that, at the time, the game was "write a song, throw it against the wall, and [don't wait to ...] see if it stuck." 😀
Sometimes your name wound up on the copyright application like it was supposed to. Sometimes, it didn't.
You simply couldn't afford to wait – record labels contracted for you to turn out "albums" as quickly as possible, so that's precisely what you did. At least ten songs apiece. Required. Two or more albums a year. Required. You didn't have time to wonder whether any particular song would be "a commercial success," and anyway it could take several years to find out if it was. So, you were basically just as surprised as everybody else was when your song "hit." (There's a reason why they call them, "hits!")
The "catalog" of any established artist might contain hundreds or even thousands of songs, while perhaps only a dozen of them "pay for the mansion." Dolly Parton's catalog, for example, contains more than 5,000 entries. How many of them have you ever heard of?