The law did not say that. The premise was because with the treaty of cession with France allowed protection of the slavery in the WHOLE Louisiana Purchase. The Missouri Compromise (i.e. Congress), broke that treaty to a point by prohibiting slavery north of a line on a map within that territory. Breaking that point of the Treaty is perfectly legal, France had no power to default on the cession of the Louisiana purchase, it no longer had any soveriengty over it.
The Compromise does not cover the issue of states. Every State is equal under the Constitution and therefore was allowed to determine its own status --- after it becomes a state.
Mississippi was orginially a free state when admitted to the Union, settlers from Virginia and the Carolinas changed that.