Traditions change over time.
If you compare all the lost traditions from the armies and military of early history to now, we have done away with many old traditions. It is more then feasible to conclude that the salute, as well as many other things, would be something that is done away with by the time Star Trek takes place.
It was also mentioned before, saluting does not really occur on ships.
Starfleet could very well be the "military" of the future. However, that does not mean it would be anything like what we consider our military to be today. It would change and take on new responsibilities, and would probably lose many as well, as reasons for many things would become obsolete. Starfleet has always been a very more relaxed militaristic type setting compared to what we consider a military today. Also, I don't believe as many of the Doctors, Scientists, Engineers, and other people who do serve in Starfleet would want to if it were to be a more hard-core militaristic type of service. That just wouldn't fit into the Federation.