My dog eats more then soap, thinfs like curtains, razors, electrical wires, shoes, stuffed animals, socks, paper, home work (im not joking),silverware and plates, anything plastic, and soap. So I dont have an answer accept for that he just likes the taste?
For the same reason they like to chew on rocks and lick up what the cat pukes up (as well as "treats" out of the litter box) and eats paper of any kind. Dogs eat all kinds of things they shouldn't. Which is why it's our job to watch out for them and make sure they can't access what can be harmful.