Don't look at it with modern eyes,
@Viper21. They didn't see see it they same way as a negative to the military cause.
It did happen but, and it's a big BUT, the women had to have the money to come. In most instances, unless you were a Grant or Stuart or one of the other Gods of War, the officers had to find a house with a room for rent near the camp. A captain's wife was not going to wash laundry for the camp.
Many men longed for the wives so if the wife could travel and come, they did, but they had to be able to travel. If it had been my great-grandmother, she would have been too busy overseeing a huge farm here in the northeast to have traveled. And then their were weather conditions. They wouldn't have traveled as much in the winter.
The hospitals units were set quite a distance from the army and I haven't read of any nurses with
living husbands working as nurses in the hospitals. Anything is possible and we certainly have very incomplete histories of the nurses.
Then, except for the most high-level women, think Julia Grant (and maybe even she was included), or the most high-level nurses like Mother Bickerdycke, when battle or siege was imminent, ALL women were ordered away or completely to the rear which might be 4 or 5 miles at least.