Is this a federal (US) mandate or a law in any other country?
Along similar lines, scanners and commercial software packages like Photoshop attempt to detect EURion dots and the digital watermarking that replaced it in currency. Obviously open source software has no such thing because it would be pointless, and it's not illegal that it doesn't.
For whatever reason, these antifeatures seem to also be missing from commercial digital cameras.
No, its a backdoor regulation in the US (probably using the threat of actual regulation premised on controlling counterfeiting to get firms onboard) via agreements from manufacturers to act without regulation.
https://rulesforuse.org/en/about-cbcdg
e.g. for the US dollar:
https://rulesforuse.org/en/currencies/us-dollar
Information on the CDS developed by the CBCDG is sparse:
https://en.wikipedia.org/wiki/Central_Bank_Counterfeit_Deter...