The Prime Minister's visit was to coincide with the launch of a national campaign to recruit 20,000 extra police officers across England and Wales, but instead it turned into a political debate about Brexit.
Following the Prime Minister's speech, which was broadcast to the nation, West Yorkshire Police and Crime Commissioner Mark Burns-Williamson demanded a "full explanation" from the Chief Constable about what had happened, adding that the officers and the force "should not have been put in that position".
West Yorkshire Police said Mr Johnson's visit yesterday had four planned stages.
The stages included a visit to the Mounted Section, an informal meeting with the force's student officers, a five minute speech by the Prime Minister followed by media questions to launch the recruitment campaign and than a visit to the NPAS base where the Prime Minister was to deliver a 10 minute speech to the media, without police officers present and take questions, whilst the Home Secretary would speak to NPAS officers and staff inside.
"It was the understanding of West Yorkshire Police that any involvement of our officers was solely about police officer recruitment. We had no prior knowledge that the speech would be broadened to other issues until it was delivered.
"Minutes before the speech we were told that the NPAS visit and subsequent brief to a small media pool had been cancelled. I was therefore disappointed to see my police officers as a backdrop to the part of the speech that was not related to recruitment.
"I am proud of the resilience and professionalism of every single one of our officers yesterday. With the recruitment of additional officers alongside them for the next few years, we will hopefully be in a better position to now deliver the service the public deserve and expect."