They don’t add nitrites to raw meat, only to processed one. Nitrites is why your ham is pink instead of gray. But, more importantly than color, nitrites are added as a preservative, to avoid botulism.
Wasn't the claim that nitrites help against botulism denied few years ago? According to Guardian: "A bombshell internal report written for the British meat industry reveals nitrites do not protect against botulism"[0]
0. https://www.theguardian.com/food/2019/mar/23/nitrites-ham-ba...