Doesn't work that way - dictatorship, I mean. Just because a law exists, does not mean that law is just. If you are a "law means it's right" person, I see your point, if you aren't you see mine.
Of the 3 branches of government, the "executive" is tasked to enforce the law. The head of the executive branch, the president, is given wide latitude in interpreting and enforcing those laws.
While presidents are given some latitude in enforcement of law, a legally passed law is law unless the courts say different and presidents take an oath to uphold those laws. Just or unjust requires changing or overturning the law not violating their oath.