It is not a new requirement. Canada's Passenger Protect Program requires the airline agent verify the documentation against the individual presenting it at the time of boarding. To fulfill the requirements, the agent is supposed to ensure the passenger's face matches the photo on the identification. To ensure a correct match, baseball style caps must be removed as the outer portion can block the view of a facial examination by the agent.
I have never seen an announcement before on this, just usually individually during boarding the agent will ask the passenger to remove their hat. But I can appreciate if the agent sees a large group or similar that is all wearing hats, an announcement is probably an effective tool to help get the hats off earlier rather than later. They shouldn't label it as a new requirement, though, as again, it has been in place for well over a decade now - I wouldn't call that 'new' myself.