Interestingly along the lines of what you are saying about military presence, Plattsburgh where I told TDK I never saw the racial environment being toxic, used to have an Air Force base before it closed down. It was in operation from 1955-1995. So a University town, close to Montreal, military presence for a long time. Kind of adds up why the environment may have felt different to me, than other parts of upstate NY.
Like it was said in The Man With The Iron Fists, "When it comes to money, things get funny." In the case of the military, regardless of branch, it can produce many civilian jobs on the base alone. State-run institutions like prisons can also generate income. They sometimes hire outside contractors like engineers or electricians to serve as instructors and supervisors. A fraction of the correctional officers actually live on or near the institutions. Some inmates have families living near the institution to maintain contact with the outside. I met a woman who asked me a question about an incident that had occurred(an inmate jumped the fence and tried to escape, but was shot and killed before he could clear the next fence lined with razor wire). I could not tell her anything because it was considered a breach of security for the institution at the time(it may still be that way now). The black inmates had showed me pictures of their wives(one was a hot looking white woman, another was an older white woman). I didn't question their relationships. I simply had no idea of what they have. As far as I was concerned, the inmates(black, white, Latino, Native American, Asian, etc.) had someone on the outside waiting for them and that, in turn, gave them encouragement to hold on to. Something to look forward to.