Some people keep a pen by the bed so they can write down their dreams before they slip away, which they do. Songs can be like that too. Even good songs which you'd maybe remember easy enough if you heard them.
The most direct way a song can affect me in making a song is when it alerts me to the possibility of a song that hasn't been written yet. Sometime that can even be a song I don't much like, or think much of, but it leaves me feeling that the subject it touches on deserves another song that sees it slightly differently.
So maybe poor songs have an important role to play in producing good songs. That's a very encouraging thought for anyone who writes songs, in our more self-doubting moments.