I think the you probably should have used the phrase "glancing off the skull" instead of "bouncing off". Hogs have thick skulls, and depending on the angle of the shot, it certainly could glance off at an angle without penetrating- that happened to my uncle using a .357 mag. It really depends what part of the skull you hit - I've seen hogs hit through the ear with a .22 mag that penetrated the skull and killed it. But a head-on shot is a completely different story.
A .40 cal can certainly kill a hog, but most of the time it's probably not going to put it down quickly with 1 shot. If it is your primary hunting gun, there are some better choices out there.