TL:DR; Some states still do have militias.
Realistically, in the modern era the U.S. states are not expected to require defense from the federal government, nor would such a defense seem possible if the entire U.S. military was willing to robotically follow unlawful or tyrannical orders (something which their oath to the Constitution forbids).
At the time of the founding of the U.S., the creation of a national military was a topic of concern to some, particularly Anti-Federalists. Not everyone was entirely on board with the creation of a national government at all. Hence the initial failed Articles of Confederation which had created more of a loose coalition of states. Even after the ratification of the Constitution, militias did indeed continue to provide the backbone of the U.S. Army up until the 20th century.
The Militia Act of 1903 and National Defense Act of 1916 began a process of army reform, which by WWII had led towards the structure of the modern nationalized National Guard we see today.
But that was not the end of independent state militias. Congress amended legislation in order to allow them to officially raise additional military forces other than the National Guard. These State Defense Forces cannot be nationalized by the federal government and would generally serve under the command of their state governor. https://en.wikipedia.org/wiki/State_defense_force
However most states do not choose to maintain an active militia (other than the National Guard) even though nearly all of them have laws authorizing the state government to create one.