Similarities between songs lie oft in the ear of the behearer (to quote Mr Thiemw). Child's logic isn't always transparent, but I'd guess that the similarity lies in the question-from-parent/answer-from-offspring structure, rather than any similarity in plot.