Initially, film were made for public entertainment. But with its increasing popularity among the masses, film has become a medium of advertisement for various company brands.
A lot of company would pay to be able to have a spot in a film even if their product is only shown for a few seconds. Everyone watching the movie would unconsciously be made aware of said product. Film is used to transmit subliminal messages to the viewers.
Film also reflects the events that are happening in the current times. Movies are made based on what happened in the past, in the present and what will happen in the future based on the current events.