Like most laws, this law has its "roots" in the history of abuse that took place in the private security and private investigator business. Too many that wanted to pass themselves off as "cops".
Just "flash the badge" and intimidate away. I can remember private security guards in the 60's dressing and "packing" just like regular police officers. Some of those private security guards even had IQ's above room temperature but not many of them.