Because they won the evolutionary lottery. As mammals evolved, each species made a “choice” about its newborns. Some, like humans, are born when they’re fairly developed, with open eyes and functioning ears. But there’s a catch: Coming out fully baked requires extra time in the womb.
For critters that have traditionally hunted for their food—like dogs—being pregnant can be a drag on survival. Instead of toting babies around in their bellies, canine mothers accelerate the process. That way, the mom can recover quickly in order to defend and feed her young. The trade-off: The pups’ eyes and ears aren’t totally developed by the time they’re born, so they spend a week or two with their peepers adorably shut.