There are many difficulties with recruiting law enforcement officers. Most of them center around the difficulty of finding candidates who can do the job well and who want the job.
The major problem with recruiting for law enforcement positions is that law enforcement is a very difficult job that has many very stringent requirements. Applicants for these jobs will have to jump through many hoops that will not be easy to navigate. This means that police recruiters are looking for applicants who probably have traits that would make them good at many jobs that are less stressful and difficult.
In order to become a police officer, one must undergo many kinds of testing and extended training. This makes it much harder to become a police officer than to enter many other professions. There are physical fitness tests and personality tests. There are background checks and, in many places, polygraph tests. There are written and oral examinations/interviews. Again, this means that it is hard to become a police officer.
While the requirements for police work are numerous, the job is, in many ways, difficult. Police officers do not have relatively stable, 9 to 5 jobs that tend to be fairly routine. Instead, they have highly variable jobs that can be boring for long periods of time and then very intense at times.
What this means is that recruiters must find people who are able to get through all of the police training and who have the right traits to become officers. Those people must also be willing to put up with the difficult process of applying and then must be willing and able to deal with the rigors of the job. Recruiters are looking, then, for people with many marketable attributes who are nevertheless willing to take a job that is very difficult. Given this, it is not strange that it is hard to recruit excellent law enforcement officers.