You can complain to the agency, but, there's not much more that you can do given the scenario you have presented here.
The officer is not required by law to tell you why he pulled you over. Under the law he must have SOME reasonable suspicion that you are engaged in criminal activity (usually a traffic violation which can be equipment or moving) before he can detain you, but he does not necessarily have to tell you that. This is extremely unusual procedure, so either this officer was fishing for something other than traffic, or he was a dunderhead. Since we don't know why he pulled you over, we can only guess as to motivations.
So, call and complain to the department if you wish. Sorry it happened, but, unless we know why he made the stop there's nothing we can tell you about how to prevent it from happening again.

