If javelina aren pigs, then why do they look like pigs?
Javelina resemble pigs for essentially the same reason people resemble their cousins: they have common ancestors. However, the last common ancestors of pigs and peccaries lived tens of millions of years ago, early in the Age of Mammals (Cenozoic Era). By about thirty million years ago pigs and peccaries were already trotting down separate evolutionary paths. How closely are pigs and peccaries related? To put it in perspective, the human family (Hominidae) and the ape family (Pongidae) had common ancestors much more recently–well within the last ten million years. By that standard pigs and peccaries are considerably more distantly related than people and chimpanzees!