OK its not exactly spying on you but it is probably printing a unique invisible code into every colour page that contains information that can be used to track and identify the printer. This was done apparently as a secret deal between the United States Secret Service and printer manufacturers. There is no law that requires this, some manufacturers are open about this in their documentation and others don't mention it at all. None of them have revealed how it works or what information is contained. No law requires this invasion of privacy and it does have implications for anonymous speech, a crucial element of any civil society.
You can find out more over at seeing yellow