You didn’t sign a contract allowing the government to tax you either. That’s because rights, obligations and entitlements in the UK come from legislation passed by Parliament, not private contracts. The same applies to the state pension, it exists because of statute and Parliament can change it.