We bar certain groups all the time – e.g. noncitizens, the illiterate, people under certain age. But we tread lightly on exclusions.
From the OP, various countries already constitutionally exclude active clergy and active military from political office. However, many of those countries, which include a number in Latin America, do so because of a history of military takeovers or a state-established religion interfering with the civil estates, and thus it’s more a reactive proposition. In other countries where there is a well-established tradition of military men waiting until past retirement to enter politics, or of clear separation of church and state, there is not as much urgency to enshrine that constitutionally, and it is regulated by law or internal rules.
In the USA, military law and regulation strictly limits the political activities of an active servicemember, including not campaigning while in uniform; plus, the laws prevent anyone from simultaneously holding two full-time offices in the government so anyway they have to quit the one job to take the other. It is eminently sensible that for the sake of the principle of civilian supremacy, as well as to maintain the good order and discipline, the roles of active partisan politician and active soldier be kept compartmentalized. So this in effect already happens.
At least for one group of clergy (Catholic Priests) Pope John Paul II officially discouraged running for office and had many quit their elected posts; many denominations do restrict the ability of clergy in positions of authority to assume a political office.
But, why bar ordained clergy from political office? Doesn’t ANYONE who is a believer in a religion “hold himself to a greater power”? What would a minister ordained, in, say, the Assemblies of God, do in an elected office that an active, committed, lifelong lay member of an Assemblies church would not do?
Felons in prison and on parole are barred from voting in most states, BUT for many offices there is no prohibition on a convict still serving being ELECTED; and conviction and incarceration of an office holder does not necessarily void the office but in many cases person has to then be expelled/impeached/recalled through the proper channels. Marion Barry notwhitstanding, it is not the norm for a convicted felon to recover from political disgrace to the point of retaking his office.
The OP mixes a bit of elements under the “legal” field:
Policemen, for instance, are civil servants, so there should be no more problem in their running for office than would a teacher or a firefighter. Again, most modern western nations stipulate in their laws that one cannot hold simultaneously two Public Offices, be they political or civil service, so naturally they’d have to take leave of their duty in order to campaign and serve, and rightly so. But as Priceguy said, how could it be bad to have someone in city Hall or in the Legislature who knows what the street is like? Again, how is the policeman’s POV any different from, say, the ambulance crew that has to deal with many of the same incidents?
Judges and the members of the Public Prosecution, AGAIN, are themselves in a Public Office already so the same restrictions about quitting the one job to take the other would apply; in the USA, a great many judges and District Attorneys of all levels from municipal magistrate to State Supreme justice to State Attorney General are elected, and run campaigns and elections ANYWAY. In other state courts and in the Federal courts Judges are appointed and hold their office for a fixed time independent of elections, or for life, depending on the jurisdiction, and the Prosecutors are appointed by the executive power either for a fixed time or at the pleasure of the executive. The *appointed * judges/prosecutors are in most cases barred from launching any political campaign while in office, so conflict avoided.
As to lawyers in general, I see no reason to bar them from political office; at least no more than bankers, farmers, or any other guild that could stand to profit from passage of legislation. The appearance of conflict has to be handled on a day-to-day, case-by-case, person-by-person basis and the mere fact that an attorney may be voting on a judiciary issue does not make it more of a conflict than if a homeowner is voting on a property tax issue.