i feel like a lot of songwriting/producing is writing bad songs and then producing them so well that they become good
often what might be happening there is they produced the song first and then wrote it