Why do some guys go from being friendly toward you to completely unfriendly and cold?

Not even just in a romantic sense. Like I have a neighbor who used to say hi and strike up conversation and now he’s standoffish and doesn’t say anything even if I wave at him.
Or another guy used to be friendly and now acts like he doesn’t even see me.

Why do some guys go from being friendly toward you to completely unfriendly and cold?
Post Opinion