The courts are necessarily the final word on what the law is, and is not. No law enacted by Congress is self-enforcing, and the executive's power to enforce the law is subject to review by the judiciary. Thus, while Congress initially enacts the law, and the executive enforces it, the judiciary applies that law to discrete individuals and, in the end, decides what the law really means. That does not mean that a court can decide that blue is red and red blue - unless, of course, the legislation in question sets those definitions - but the English language is a necessarily imprecise tool and therefore must be interpreted in order to be applied, and it is the job of the judiciary to do that interpretation.
Even the scope of that very limited number of issues labelled political questions - that are left to the legislative or executive powers - is determined by the judiciary.
And this is the only way the system can work. If the judiciary does not have the final say on what the law is, then it is no longer a coordinate power and will necessarily become subordinate to the executive.