Why do babies like pacifiers even if they aren't getting any milk from them?

Calming. Sucking is really the only mechanism newborn babies have to calm themselves. Its a built in reflex and helps calm babies, even when not eating. Its one step parents can use to help calm crying babies, but some babies will need us to calm them with holding, wrapping, shushing, etc...
Oral gratification. The lips have one of the highest concentrations of sensation fibers of the body. This is thought to explain why babies enjoy sucking 24/7.The input from these fibers go to pleasure centers in the brain. This shows up in adults with nail biting, kissing, eating just to savor food, smoking & just about any pleasurable thing you can do with your lips. It also means babies suck when they are not hungry.