I'm going to say it's due to a ricochet.
After ricocheting off of a hard object, the deformed bullet makes a whining sound. That sound effect is commonly used in old westerns especially when they are using boulders for cover. But sometimes they throw the sound effect in even when it's not appropriate. (sound editors may not be gun savvy and not even know what actually causes the sound, just that they are supposed to use it)