Why do stranger guys randomly say hi?

this has happened to me twice so far:

1. when i was in line and a guy behind me poked me and said hi, so i said hi back and we never spoke again

2. when i was with my friends and a group of guys were walking by, as they passed us one of them said a quick "hi" and i could hear them laughing afterwards

is this a form of flirtation? am i overthinking?

Why do stranger guys randomly say hi?
Post Opinion