It is well-settled that the state in its exercise of police power has the sovereign authority to define and punish crimes and lay down the rules of penal procedure for the enforcement of the law as legislated. However, it is to be noted that in most countries of the world, certain limitations are imposed against the legislature in its performance of its lawmaking duties.
As part of the check and balance attribute of most democratic governments which have executive, legislative and judiciary branches or departments, the legislature is imposed with certain limitations in its passage of penal laws.
For instance, legislature must not pass ex post facto law. This law is obviously prejudicial to the accused since it makes an act criminal though such was committed before the passage of the law, or it tends to aggravate a crime, makes it greater than it was when committed. An ex post facto law likewise changes the punishment and imposes a greater punishment than the law annexed to the crime when committed, alters the legal rules of evidence or deprives the person accused of a crime some lawful protection to which he has become entitled, such as the protection of a former conviction or acquittal, or a proclamation of amnesty.
Another limitation is the passage of bill of attainder. The legislative branch of the government is not allowed to pass an act which would inflict punishment without the benefit of a trial. A bill of attainder is a legislative act which immediately makes an act punishable even without the regular due course of a trial. The legislative act functions as the short-cut way in determining the guilt of the accused person. A good example of this is when the legislature passes a law which authorizes the arrest and imprisonment and immediate execution of their punishment of alleged terrorists without giving them a day in court.
Due process is what makes justice a real word and not merely an illusory concept. Every offender should be given the right to exercise their constitutional rights to keep the government from abusing its seemingly boundless powers to the detriment of its people. Hence these limitations.