Without going into too much detail, a state's licensing and registration laws are a little different when you're in the military. The state you're stationed in is your "temporary" address. Your home state is considered to be your legal and permanent "home address".
We were Navy and we were stationed in Florida, but our "home address" was Texas. Our driver's licences were issued by the State of Texas. and our car was registered and insured in the state of Texas, and our license plates were issued by the state of Texas. That was fine with Florida and Texas, because we were military. We just renewed our driver's license, our insurance, and our registration, by mail, with Texas when they became due.
We traded in our car on a brand-new car at a dealership in Florida. The only thing that changed was that we now had Florida license plates on the new car.
We were later transferred to California, with a car that had Florida license plates on it, We weren't required to obtain California license plates, or to obtain California driver's licenses, or change our insurance to California, or register the car in California, because we were military and were considered to be "temporary" residents of California. All those things were already in place in our "home" state. .
Our car did have to pass the California safety inspection. It didn't have to pass the California emission control portion of the inspection because our car was registered in Texas; Texas doesn't test for emissions; and we were military; We did have dark pastic film on the rear window of our hatch-back. We had to remove that in order to pass the safety inspection because California didn't allow that on the rear window of any vehicle that was going to be traveling on its public roads for a length of time.