I believe this varies by state. But Texas still allows it. The belief is that if a person is struggling financially, they will be more inclined to steal. I don't know if there is any statistical research to support that.
I know of people who worked their entire lives in banking. When they lost their jobs, and were unable to find new ones right away, they ran up their credit cards, and got a bad credit rating. No bank would hire them.
Police officers are supposed to be above reproach. They should have nothing in their background check that shows that they might be weak in the face of temptation. For example, if someone were to offer them an illegal way to make a lot of money, and they have a lot of bills to pay, it could be tempting.
Safeguarding your credit rating is important for other reasons beyond just getting a job. Your credit rating will determine what interest rate you are charged for borrowing money. The higher the interest rate, the more you will have to pay. It can affect your ability to be approved to buy a house. I believe they also check it when you rent an apartment. For some strange reason, insurance companies also check it (homeowners insurance, car insurance) - at least in Texas.
How to protect your credit rating? Start by creating an emergency fund. You should set aside enough money to cover all your living expenses for 3-6 months. Live within your means. Rather than having to have the latest smartphone, hold onto yours for another year, for example. Don't have too many credit cards (the amount you have available to you on those cards, even if you don't use them, will count against you). I use just one card, and keep the balance low. If you hit a bump in the road, such as losing your job, stop spending as if nothing has changed - cut back to the bare essentials! Financial discipline is not easy, but, it really pays off in the long run.