The law?
Where does the UK law say it is illegal to carry passengers on a jump seat in the cockpit of a UK registered aircraft? All that we have seen on this thread is a letter from the Civil Service directing that it shall not be done.
However it is possible that as a result of the letter the CAA directed Public Transport Operators with AOCs to include an appropriate instruction in the company's Operations Manual.
Breach of the requirements of the OM is not, in itself, a breach of the law. but the operator may discipline, ie sack, the pilot.