When the flight crew greets you upon entering the aircraft, do you think it is just a polite formality? Well, most people think this practice is intended to make passengers feel comfortable and show how friendly the flight attendants are. It is true to some extent, but the crew members also use this as an opportunity to assess the passengers and look for anything suspicious or out of the ordinary.
The greeting is a way to get a better idea of passengers who could possibly be problematic or may be intoxicated.