Yes. It violates WinRAR’s license agreement and copyright law. Distributing it is illegal; using it is a civil violation.
It looks like you're asking about rarreg.key files appearing on GitHub. rarreg.key github
A quick search for rarreg.key (even just now) shows ~6,000+ results. Most are from: and Alternatives Yes
Understanding "rarreg.key github": Legitimacy, Risks, and Alternatives rarreg.key github
Yes, I know WinRAR's trial never actually expires. That's not the point. The point is about security hygiene and respecting licenses.