Short answer: Yes. While not always completely effective at preventing infection, studies have shown that exposing your immune system to the influenza virus can reduce the severity of the illness.
Longer answer: Influenza viruses are incredibly adept at developing new strains and mutations over a very short period of time. Other viruses like measles have stable genomes, which prevent it from mutating significantly. Therefore, a vaccine for measles will still be effective decades later because the immune system knows exactly how to counteract the virions. Influenza virus vaccines are composed of multiple strains of influenza, based on predictions of what strains will hit the country. It is difficult to determine exactly what strain will be predominant, especially months in advance, so often the flu vaccine doesn’t entirely match the makeup of the predominant virus. However, just introducing your immune system to influenza annually trains your immune system to recognize and combat microbial invaders.