I think it's an extension of the way we speak to babies, sometimes called "motherease". With babies it actually does help them to concentrate on what you're saying and understand you better, and many of us treat our pets like children.
This is such a good question.
I am very guilty of doing this and have no idea why! Perhaps when they are good, I think I once learnt to talk in high pitch, and my pets really are my children as children all grown up and gone!