So why is it that in some towns people say "hi" to strangers while in other towns they don't?

I was out jogging the other day and noticed that everyone I went by looked at me and said "hi" or "good morning". Couples walking together, single men, single women, people on bikes all greeted me as I ran.

I've been in other towns where no one -- and I mean no one -- looked at me let alone said anything. I've been in resorts or nice neighborhoods where people look straight ahead and do their best to not acknowledge my existance.

It seems to be characteristic of the place. Why is that?