I can only speak from my personal experience, but I would attribute it more to the former. The advice I generally heard was that you should stick to the heavily developed areas, near your hotel, etc. We were abroad for about 4 months, and I always felt safest outside of the touristy, "nice" areas. Especially in India, you'll find many scammers (sometimes entire organized teams of them!) in the areas where there are lots of tourists because that's where all of the money is. But, I found that by walking often just a few blocks away from these areas you would be alone as a foreigner, and there wouldn't be mysterious people with excellent English following you around and trying to "befriend" you. I was definitely noticed, but people would be smiling, or shouting "hello!", or waving. I never felt threatened.
I felt very fortunate that I learned this lesson; we also met many people in India who had barely left their hostels because they were so stressed and afraid of dealing with the scammers who waited at all hours of the day and night in those areas. When they made it out they didn't go far: they went to the tourist-friendly places that could be found on TripAdvisor, but these places were also teeming with scammers. I think a lot of people end up missing out on India because of this and not liking it.
We were very lucky and none of us dealt with crime the whole trip. Of the travelers we met who had had stuff stolen though, it was in touristed areas, especially on beaches while they weren't paying close attention to their stuff (and/or very drunk).
A Norwegian woman I worked with was in India as a kid because her parents worked for UN.
IIRC she told us how a woman, after staring at her for a while leaned over and pinched her face to check if a kid could really be that pale or if it was some kind of paint or something.
She also remembered being pulled in the hair because people wanted to know if it was real.
That said, this was something like 30 years ago and today after reading this discussion I wonder if she was just really unlucky or what.
She said that basically everyone in the village came over to touch her skin and hair, because they have never seen such a pale person(and blonde hair).
I did also have people touch my arms and look at me with big grins on their faces. If you're not from a place where touching a stranger is acceptable, this can understandably be quite shocking until you get used to it. There are so many people in India that you'll find people with a wide variety of different customs and social norms.
I'm black; I remember (white) people being amazed at how my hair felt before I kept it really short. A black woman I knew who lived in a wealthy Detroit suburb where they were the only black family related to me (while laughing) how the neighborhood kids were so fascinated that the color on her children's hands didn't wipe off.
This is all in the last 30 years or so in the US. People meeting different people is a good thing, don't take it negatively.
I was fortunate to have lived in a fairly diverse community (military town, lots of different people, although the city is very much almost majority-hispanic), and one of our family friends was a tall black police officer. To a toddler exposed to many different people, I never gave it much thought--except the hands, of course, when he'd pick me up to show me the lights and siren on his motorbike. (It's maddening how stupidly enjoyable children find certain loud noises.) The young me was oddly fascinated with the lighter color of the palms of those of African descent, and how similar--yet different--they were to my own.
As the years passed, I never really gave it much thought until a friend of mine from high school looked at my hands once when we reconnected some years later and asked me "Why do white people have such pink palms?"
He was teasing, of course, so I had to relate my own experiences. We shared a good chuckle.
Sometimes it's heartening to consider that our differences can be advantageous as a vehicle for bringing us together. It's rare (sadly), but it's also a very beautiful thing.
Thanks for reminding me of this, even if indirectly! Good memories.
Though also for perspective, a few years ago the NYC-Boston intercity bus gray and legit markets briefly merged. Before Greyhound then used political and pr hardball to repartition them, which also resegregated them by class and race. Upon hearing I took these cross-over "Chinese buses", I heard a lot of "oh, they're not safe" (the pr campaign), and once, from a professionally-dressed black woman travelling Greyhound, a comment about "dirty Chinese".
I've found that Indian toilets are more hygienic while travelling India, because you don't touch the toilet at all. Just bring your own toilet paper.
Because the advisors get a cut of the train fares, most likely.