Foley was replaced with recordings of actual gun sounds, but there are huge technical hurdles involved with using actual gun sounds. The first issue is that guns are so fucking loud that there needs to be a shitload of headroom in the recording in order for it not to clip. This results in a sound that spikes hard for a fraction of a second and then has a very quiet trail-off sound after, as opposed to something that is fairly evenly loud for the duration of the sound effect. They try to correct for this by compressing and amplifying the recording so that the quiet parts match the loud part, but this creates a very bizarre and unnatural sound.
Another issue is the recording environment. An indoor shooting range will make the sound reverb quickly off the walls, giving a closed-in feeling. This is a fine match if that is the environment of your game, but terrible for outdoor. Recording in an outdoor rage has the reverse issue, where it will mis-match a game's indoor environment sound. It manages to be clear of that close reverb effect, but will often suffer it's own problems with echos in the distance bouncing back.
The last issue is with the sound of guns at various distances. An up-close gun recording shouldn't be played to hear a gunshot hundreds of meters away, and vice versa. You need a variety of recordings for various distances to get more accurate simulation in the game, barring any fancy audio rendering tech that was killed off by Creative Labs kikes 20 years ago or soon to be locked away in the proprietary realm of Nvidia ray tracing.