It doesn't change the fact that it's the rated output that's referenced, not the actual output. I'm sure you don't seriously think the legislators would expect the ebike manufacturers to test each individual motor to obtain the actual output for that specific motor.
If the rated output isn't on the label then you can look at the technical specifications for the motor.
I think you're missing the definition of "rated output" in this specific context.
"Rated output" is defined in the text of the British Standard, and is a figure resulting from a measurement conducted using a specific method with specific test equipment at a specific temperature and with a specific battery voltage.
It isn't the fairly meaningless figure that manufacturers sometimes mark on the motor case, by a long way, in fact it's not even close.
The reason isn't that straightforward, but has to do with the physics of permanent magnet electric motors (either brushed or brushless). Any PM motor will be able to deliver a wide range of power output, often far greater than some of the fairly meaningless figures printed on them might indicate.
In practice, an ebike motor power output is set by the controller, not the motor. It is for this reason that the British Standard uses motor voltage when determining rated power. You can have a wide range of maximum motor voltage and motor current when using the same battery, because of the transformation between current and voltage that occurs in any ebike motor controller (the controller is an efficient buck converter, in effect).
On a more practical note, here is the motor manufacturers test data for the Tongxin 180W motor:
The test method used was not to BS1727:1971, in fact it was a very different test where the dynomometer load was increased with a fixed motor voltage applied and with the controller throttle set to 100%, with no temperature control or attempt to reach thermal equilibrium.
Look at the red line at the bottom. This shows the power output with varying torque. As you can see, this "180W" motor really delivers over 350W in practice.
To discover the continuous rated output of this "180W motor, Justin at Grin Cyclery has tested it on his dynamometer, using a methodology similar to that in BS1727:1971, but without the accreditation or equipment calibration certificates that the British Standard requires. His testing (the results of which can be seen by running the simulator on his website) reaches safe thermal equilibrium at about 350W continuous power output.
So, here we have a motor that has a manufacturers rated power of 180W ( I have one, the label clearly states 180W), yet would have a BS1727:1971 rated power that is around double.
It is for this reason that the law requires the motor to be rated using the British Standard. Does this make sense now?