It doesn't actually turn for example the free press clause into a nullity, it just means there is a conflict and one supercedes the other. It's not uncommon in law. If Apple Daily and Jimmy Lai had no contact at all with foreign agents, it would have applied unambiguously.
So clearly it doesn't turn it into a nullity, it just limits it.
Beyond that, fundamentally, the law was negotiated by the UK from a position of massive weakness, as they militarily simply could not hold Hong Kong, and legally wouldn't be able to supply it either. It is expected that debilitating clauses are included.
One such clause is that China has total sovereignty in anything that concerns foreign affairs or defence.