Along with the other 2 answers having good insights, there's another aspect that's often missed: he has long hair.
There was a strong controversy about men having long hair around that timeframe.
The "Generation Gap", or the inevitable perceived divide in worldview between the old and young, was perhaps never greater than during the counterculture era. A large measure of the generational chasm of the 1960s and early 1970s was born of rapidly evolving fashion and hairstyle trends that were readily adopted by the young, but often misunderstood and ridiculed by the old. These included the wearing of very long hair by men,...
You can search for "long haired freaky people" and find all kinds of signs (literal signs) and articles about how men with long hair (even as "long" as Rambo's hair is) weren't welcome to apply for jobs. Business owners would actually hang signs in the windows of their stores saying "long haired freaky people need not apply". This was in response to the older generations often refusing to believe the younger generations who started talking about the consequences of climate change, often earning the name "tree huggers".
There's even a song about it. Well, this is one that I'm aware of, anyway.
And the sign said "Long-haired freaky people need not apply"
So I tucked my hair up under my hat and I went in to ask him why
He said "You look like a fine upstanding young man, I think you'll do"
So I took off my hat, I said "Imagine that. Huh! Me workin' for you!"
This is so prevalent that HR departments still talk about it.
And the Sign said, Long Haired Freaky People Need Not Apply…
You’d be hard pressed to find a sign like that out today. Or advertisements seeking “Help Wanted Male” “Help Wanted Female,” or signs telling someone to use the back door.
There's still some of this discrimination going on, too. This is from 2010 and it's an anecdote, but it shows that long hair on males still isn't considered OK by some.
While speaking with the manager, Mike was told that he couldn’t work there unless he cut his hair; all males who work there are required to keep their hair above shoulder-length. Mike’s hair is long — about to his mid-back. But it is combed, clean, and well-kept.
I can appreciate the manager’s position — not wanting long hair around groceries. And Mike is more than willing to put it up, tuck it under a hat, or any other accommodation he needs to make — except cut it. But, those aren’t options for him. It’s cut it, or no job.
Mike made an interesting point – there are plenty of young women working at the store with long hair. They are simply required to wear it up. So, why is it any different for him? He says it seems a bit sexist.
When I went for a job as a high school kid in the late 90's, I had nearly shoulder length hair. I had a good interview with a restaurant manager, and he said that he liked me but to "come back after you cut your hair". I think I got it cut that night and came back to get hired. (I worked there for around 1.5 years.)
A commenter below noted that "long haired freaky people" was geared towards hippies. Yes, that's true. It's also somewhat true that hippies were generally the ones protesting the war and the soldiers coming back from it, but they weren't the only ones, and that's off topic, so I won't get into that.
The one thing that sticks in my mind is that John Rambo's character somewhat reminds me of John Lennon. He (in)famously wore an Army jacket, was a hippie, an anti-war activist, and "rebel" in general. He also wore a somewhat bushy hairdo, like Rambo does.
I wonder if Sylvester Stallone was trying to blur the line deliberately between a war hero and war activist? I doubt it. Would Sheriff Teasle made comments differently for a Vietnam war soldier and war activist? I doubt it. Both were considered "undesirables" and likely to cause troubles in an otherwise quiet or "boring" town, so neither were wanted.
Business owners who cared about long hair didn't really care if you were a Veteran, activist, hair stylist, accountant, bell hop, lawyer, or anything, just that you had the Counter Culture-ish long hair.