Actually, that's my point. The cop's job is to enforce the law (which investigations are a part of). He was not doing this. Therefore, he had no business doing what he did while on duty.
Your assuming that this is an abuse of police power. What power did he use to do what?
When you show up in a building in uniform wearing a gun and a badge and demand access to a locked area, the use of police authority is implied. Now, what the janitor's involvement was (there are at least two different stories on that) and what he thought are debatable. We don't have the full story on that. But it seems implicit to me that this guy projected that he was on official business by showing up in the way he did. It would take an investigation to get a factual determination.