In exactly the same way, the EU code of conduct requires codeshare disclosure, so that if you book a ticket on a codeshare/franchise flight with a BA flight number, the system will generate a message that the flight is operated by, for example, Iberia, with an Iberia aircraft and crew (and thus best avoided!)
I rarely defend anything that the EU has done but this does have a value.