Ham is called ham and not pork because the ham is the cut of pork derived from the hind leg of a pig.
The word ham came from and derived from the Old English ham or hom meaning the hollow or bend of the knee, from a Germanic base where it meant "crooked".
It then began to refer to the cut of pork derived from the hind leg of a pig around the 15th century.
Ham is usually already cooked while pork usually comes raw and needs cooked before you can eat it.
However some pork such as canned pork is already cooked and ready to eat.
Ham even when whole is mostly already cooked and ready to eat.
Ham really is pork because it is meat that comes from a pig just like bacon is pork but it just has a different name.