Never said that. I was asking why someone's wife would not be allowed on base and you talked about barracks rooms, where many actually do allow women (at least during certain times) access. But since barracks rooms are mainly for single servicemembers, not married ones, then it is not generally an issue to begin with. Some military barracks do allow opposite sex members in rooms. Heck, a few bases have gone to apartment-like onbase barracks for members so they can have whoever they want in their rooms, whenever they want (so long as they are not causing problems of course). Sure there are still some bases where barracks are "opposite sex not allowed", but those are becoming more rare outside of training commands. The military is starting to realize that they aren't going to completely prevent their soldiers, sailors, Marines, or airmen from interacting with the opposite sex, so they are trying instead to simply limit it. Your own experience is also not what defines the rules for the Army as a whole. It mainly depends on the command.
But none of that had much to do with why a person's wife would not be allowed on base. Most bases allow wives on bases at any time because they have an ID card. Jerry explained it (at least a little, since I've never heard of such a precaution, since we, sailors, have family come with us up to the pier gate when we leave). And a married soldier would not normally be quartered in the barracks either. I'm assuming that some bases assign barracks rooms temporarily for pre-deployment, however that would not be common and certainly would not be for very long. (The Navy wouldn't have enough rooms to do that for us on most bases, we are already struggling with barracks space, one reason they made the onbase apartments in San Diego.)