They're not giving it away, rather they're essentially forming a patent oligopoly. Huawei and Qualcomm together hold the bulk of patents for 5G. It's of no value to them to try to litigate against each other. Here they're getting a cross-licensing deal that will solidify their patent licensing wall/revenues.
Is it potentially anticompetitive? Yes.