This is not true. You don't have to record anything with HR for legal action. Its not a prerequisite by any means.
Going to HR is always a wrong move. Get a lawyer.
BTW, you sue your company and you're gone either way.
This is horrible advice. Going to HR is about leaving a paper trail, which is very important. No judge or arbitrator is going to give two hoots about i-said/they-said without (dated) documentation to back it up.
In an HN discussion about dealing with medical billing / insurance people who screw you over, it was recommend to keep meticulous notes of everything, and that reading back specific dates and names of people you spoke to who contradicted the person you're speaking to now got people to take you seriously and fix their mistakes real quick. I have since found that to be true.
You're responsible for keeping your own paper trail.
It's a shitty unwinnable situation for employees, I've been on the shit end of this stick before at a different tech co for complaining and was retaliated against. It's not fun and I feel sympathy for anyone who's lives are being turned over because of it.