Actually they still have to learn to use the box, usually from their mother. If they do not have a box, they will select a latrine area.As far as dogs, some are very easy to train and also select latrine areas. It depends on the breed
Well in all actuality cats aren't born "knowing" to use the litter box they see there mother using it and cats have the natural sense to dig and cover it up. Kittens normally don't use the box for awhile until you show them a few times where it is, "3-5 weeks old" Also cats are cleaner then dogs....
you do have to teach them but it generally is pretty easy. I once read that cats originally came from the desert and they would bury their waste in sand in order to hide it (and themselves, of course) from predators. so cats have an inborn tendency to bury it that comes from their ancestors.