That's (mostly) true for "primary legislation" (Acts of Parliament) but "secondary legislation" (regulations, orders, rules and so on) can be challenged and potentially overturned/similar in the courts. This partly reflects the fact that secondary legislation usually receives significantly less parliamentary scrutiny (and in some cases none at all). The legal challenge which Wikimedia brought here was to secondary legislation - regulations made under the OSA by Ofcom - not to the OSA itself.