When Mississippi, or any state, passes any given piece of legislation, clearly the law makers want(ed) that piece of legislation.
However, that does not mean that the piece of legislation in question is "legitimate" or "constitutional".
This is the on-going (on-going since the inception of the USA as a country) push & pull
> States' Rights and Federal Authority
> proposed laws (either state or federal) and the Constitution of the USA.
> the legislative branch and Judicial branch authority
> the rights of citizens and the authority of the government (either state or federal)
It is part of the three-way check and balance between the executive, legislative and judicial branch of our government... and the check and balance between states' rights and federal authority.
Sometimes the States get to do whatever they "want".
Other times States do not get to do whatever they "want"
In the case at hand, apparently, U.S. District Judge Joseph H. McKinley Jr., U. S. District Court for the Western District of Kentucky has determined that the law in question violates the U.S. Constitution. This opinion may or may not stand. No doubt various appeals will be made and judicial determinations based on those appeals will be made... possibly it will go all the way the our Supreme Court.
Sometimes it matters what state law makers "want" and sometimes it does not matter what state legislators "want".
As a side not to that
this is why judicial appointments are so important from a political perspective.
What is happening right now, right or wrong, is that the Republican party (for the most part) does not like the Supreme Court's decision in Roe v Wade
So the Republican party (via President Trump) is doing (primarily) two (2) things:
1. Appointing more conservative justices, who (presumably) will be willing to in someway overturn Roe v Wade.
2. Some Republican controlled state legislators are passing laws that challenge i]Roe v Wade.
The strategy is to overturn i]Roe v Wade.
The tactic is to appoint conservative anti-abortion judges and pass legislation that is directly and legally contrary to i]Roe v Wade.
In our system, and in this situation, laws (legislation) are not strong enough alone on issues like i]Roe v Wade. The law makers in question want a complete win. They want these laws challenged in court. They want one or more of these cases to make it to the Supreme Court...
...in hopes that a conservative dominated Supreme Court will over turn i]Roe v Wade.
This is the Republican game plan and has been their game plan since before the election of President Trump. It what the 2016 presidential election was all about.