Somebody (more likely a group of somebodies), somewhere is responsible for having gone to each and every printer manufacturer and done or said something to make them implement this functionality.
Notably, they didn't go to congress to have a law publicly debated and voted on. It was all hidden from the public.
The original somebody was likely the US Secret service, who are also responsible for US dollar currency forgery policing.
When color printers/copiers first appeared there was a concern about people photocopying money. The old joke was that your color photocopier "would pay for itself in no time".
thats only for evidence/prosecution for fraud/criminal intents. If one say's "NO WAY I said and printed that contract" ... "Lemmy check...oh! You did. Its your printer. Look!".
I think its not like "somebody gone to each..", but rather "... a good idea".
If I remember correctly from the FOIA documents we got, it was a meeting or series of meetings with a Japanese printer industry association during the 1990s.
I forgot if we learned whether the government side was a specific government or governments, or the consortium called Central Bank Counterfeit Deterrence Group
https://rulesforuse.org/
which has been involved in other related stuff (like making some software and devices refuse to process images that are detected to be images of currency!).