From what I see, a judiciary has the power to interpret laws and they don't need to interpret it with regard to the intent of the legislature neccesarily and they can apply standards of fairness in interpretation decided by themselves rather than a drafters interpretation. but I am assuming that this requires a constitution to create underlying principles?
The power definitely exists, and it is also said by some (respectable persons) that they have a duty to do so.
There are many schools of legal interpretation. One trend is to attempt to discern legislative intent, based on whatever facts there might be such as newspaper articles or legislative committee reports. A contrary trend is to look exclusively at the text enacted by the legislature – this school is known as the Textualist school, and is currently dominant in the US Supreme Court.
There are also non-textualist "progressive" trends that seek justice according to some social principle, rather than the text of the law or the definitive intent of the original legislators, which may address the situation that you have in mind. In civil cases, statutory law tends to be rather unclear, allowing a judge to decide on the basis of their beliefs of what is fair, equitable or just. That is because in the common law, close to a millenium old, judgments were supposed to be "just". In the US, much of the common law has been re-coded as statutory law, and in that case, the intent of the legislature is really to "encode the sense of justice implicit in the common law".
This does not mean that trial judges have unlimited power to set aside the words of existing laws. Their primary obligation is to apply the law literally, as interpreted by their superiors (appellate courts). When the higher courts are silent and when the legislature is not clear, the trial judge has some leeway to follow whichever jurisprudential philosophy they adhere to.
Since you are asking on law.SE, I will assume you are asking about the legal principles that drive interpretation.
In canada, the current approach to statutory interpretation is that:
Today there is only one principle or approach, namely, the words of an Act are to be read in their entire context and in their grammatical and ordinary sense harmoniously with the scheme of the Act, the object of the Act, and the intention of Parliament.
Rizzo & Rizzo Shoes Ltd. (Re),  1 S.C.R. 27 at para. 21
"[E]ven with penal statutes, the real intention of the legislature must be sought" (R. v. Hasselwander,  2 S.C.R. 398).
Interpretation statutes also direct courts to give enactments "fair, large and liberal construction and interpretation as best ensures the attainment of its objects" (e.g. Interpretation Act, s. 12).
This has been described as a "duty" (Sovereign Life Insurance Co. (Re), 2001 ABQB 60).
It would be an error in law for a judge to not focus on attempting to ascertain the intention of the legislature. This flows from the constitutional principle of Parliamentary supremacy.
No, but …
It’s up to the court to determine the drafter’s intent. The common law is firmly in the death of the author camp of textual analysis.
However, many jurisdictions have an Act that tells people (including judges) how other Acts should be interpreted. These are usually called the the Acts Interpretation Act or some similar tautological name.
The Commonwealth’s Acts Interpretation Act was the 2nd Act passed by the first Australian Parliament. The first act, was the one that implemented our extremely racist White Australia Policy because you have to have your priorities right.
It contains basic definitions of things like days and months, the Queen, the Governor General, the Minister etc. it also contains general interpretation rules in Part 5 including that:
- Acts are to be “read down” to ensure they comply with the Constitution.
- an interpretation that confirms with an ACT’s stated objects is preferred over one that doesn’t.
- that extrinsic material may be used to assist in interpretation.
- where examples are used in the Act they can extend the plain meaning of the provisions.
- that references to the Queen, the King, the Crown, or the Sovereign refer to the current incumbent of that office.