Why do doctors slap babies when they are born?

Why do doctors slap babies when they are born? To knock the penises off the smart ones.