This is some old-school band and producer stuff from Foo Fighters. Kids, it used to be when bands went into the studio, they recorded at least double to triple the amount of tracks that ended up being on a record.
This is why so many artists have a "vault" of unreleased music. Doesn't mean those are shitty songs or cuts, it just means they weren't AS good as the others.
Look at this list from Foo Fighters. 30 songs. The album "But Here We Are" would eventually only have 10 on the tracklisting.
So, why? What is the reasoning?
Well, first it's a quality thing. You don't know how a written song is going to translate into a performance recording until you attempt it. Sometimes the band just can't get the magic on a certain song (at least not yet), sometimes the producer doesn't get the writer's vision.
Second, by attempting this many songs, the band gets better and better during the session and more familiar with the workflow of the producers and engineers. It's work. It's a task, it takes focus, and it will be frustrating. That is part of the process.
Third, often parts of these recordings end up informing other songs to make them the best ones. Maybe the way that pre-chorus lifted can be used on this other one that is "so close." In other cases, some of these titles are really just jams with some words, and they may end up being fully part of other songs. When you do this many songs, you allow for that, you allow for the destruction and creation.
But mostly, it is about story. Albums are a snapshot in time and emotion. The the best stories are edited down to their very essence. So, by attempting so many songs, it can become clearer what the narrative of the record is becoming, or will be. It becomes clear which songs fit in this collection (and crucially, which don't). It also becomes real clear which songs are the clear favorites or singles.
Now, most indies don't have the money (or the writers) to do 30 songs at a pro recording level. Understandably, the reason why most independents don't do this is because studio time is expensive.
So, shoot for 15, maybe 20, to get to 10 song album. Or do 10-12 to get to an EP of 6, same principle.
Do not think of this as a waste of money. At the end of the process, you and your band will be better studio musicians, you will be a better songwriter, and you will begin to fill your music vault, which will continue to pay off for literally the rest of your life, and beyond.