Cabinet Secretary Sir Mark Sedwell said there was not a “deliberate attempt” to make political points in front of the officers, which angered West Yorkshire Chief Constable John Robins.
But in a letter to Labour's Shadow Policing Minister, Louise Haigh - and seen by The Yorkshire Post - he recognised the divide between the two parts of the speech should have been clearer.
Mr Johnson had been in Wakefield to launch an officer recruitment drive but he also spoke about Brexit and other policies.
Sir Mark said the backdrop was “not reconsidered” after a “late change to the speech”.
He said although it was not ususal for ministers to include political content in speeches, he added: “There should have been a clearer delineation between the government policy aspects (concerning police recruitment) and political content.
"In addition, the media questions went beyond police recruitment to cover other topical issues of the day.
"Due to the last minute changes, these aspects were not considered properly."
Ms Haigh said: "The Prime Minister's desperate attempt to use the police as a party political stunt backfired wildly and the civil service's unease at his behaviour is obvious.
"This is a Prime Minister that cannot be trusted to behave properly, tell the truth or run the country."
Sir Mark said there was “a perception created” that police had been involved for political purposes but this was “unintentional”.
He added: “The Prime Minister's Office are reviewing their visit planning process to learn any lessons and to improve planning and communication.”