The runtime loader hasn't called setuid() for the ping binary: the kernel has. The whole point of the setuid model is that only the kernel's exec() implementation(s) can elevate privileges: potentially-unprivileged code (like the dynamic loader) cannot.