... Prince is infamous for creating huge amounts of stuff and just shelving it too.
...
Most professional writers/musicians do this. In fact I would wager all writers that are known for consistently putting out great songs only do this. It's the only way to put out amazing work consistently. No one, and I mean no one actually only writes great songs every time. There's a lot of bad ideas in that process that will never see the light of day and never even be spoken of outside of fellow writers/musicians and friends because those songs just weren't good enough.
The hard part is being consistent over many years and powering through the many poor outcomes so that you get to the one great outcome, and rinse and repeat. The people who can do that without burning out are the ones who make it to the tippity top.
What's funny is you'll have one-hit wonders where they power through the poor outcomes, get their first great outcome, and don't realize that's the process required to make many hits, and they just put out every idea they create afterwards and wonder why only one or two songs did really well and they can't seem to make it happen with their other songs and get discouraged.
They think these amazing musicians never make bad music, but that's just not the case. They make bad music all the time, but they never show anyone. They only release the greats, and so they are constantly working and writing song after song, waiting for that one great idea to come about.
No one, not even Michael Jackson, writes a good song every time. I would wager all my possessions that if all of his unreleased songs were in fact released, most of them would be mediocre or disappointing (but still very interesting to hear). Those songs aren't meant to be heard by anyone except for him and whoever may have worked on them, and people they showed that they trusted asking for feedback. Otherwise he would have released them.